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
Get options for category endpoint.
public static function getCategoryOptions() { return self::get('category') ?: []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCategoriesOptions()\n {\n return self::get('categories') ?: [];\n }", "public function GetCategoryOptions() {\n $return = \"\";\n $this->GetCategories();\n \n // Create the Options\n foreach ($this->rs as $row) {\n $return .= '<option value=\"' . $row->categoryID .'\">'. $row->categoryName .'</option>';\n }\n \n // Return the <options>\n return $return;\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getTaskCategoryOptions() {\n return $this->taskCategoryOptions;\n }", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function getCategoryList() {\n $categories = $this->couponServices_model->fetchCategories();\n\n $category_options = array();\n $category_options[\"\"] = \"-- Select category --\";\n foreach ($categories as $item) {\n $category_options[$item['categoryId']] = $item['categoryName'];\n }\n return $category_options;\n }", "abstract public function getOptions();", "function categories() {\n\n foreach ($this->loadCategoryAssoc() as $id=>$title) {\n $options[] = array(\n 'id' => intval($id),\n 'title' => $title,\n );\n }\n\n return $options;\n }", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "public function getOptions()\n {\n return $this->get(self::OPTIONS);\n }", "public function getCategory() {}" ]
[ "0.7576817", "0.6869979", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66761726", "0.66178155", "0.6617386", "0.6617197", "0.6617197", "0.6514194", "0.64892375", "0.6484986", "0.64263076", "0.64256626", "0.64256626", "0.6416884", "0.63493943" ]
0.8151903
0
Get options for products endpoint.
public static function getProductsOptions() { return self::get('products') ?: []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getProductOptions()\n {\n return self::get('product') ?: [];\n }", "public function getProducts_options() {\n\t\treturn $this->products_options;\n\t}", "public function getProductOption();", "public function getOptionList()\n {\n return Mage::helper('bundle/catalog_product_configuration')->getOptions($this->getItem());\n }", "public function optionAction() \n {\n $result = array();\n \n $productIdOrSku = $this->getRequest()->getParam('product');\n $attributeOptionId = $this->getRequest()->getParam('id');\n\n try {\n \n $model = $this->getModel();\n $model->loadOptions($productIdOrSku, $attributeOptionId);\n $options = $model->getApiOptions(); \n \n $result = $options;\n \n \n } catch (Exception $e) {\n \n $result['error'] = true;\n $result['data'] = $e->getMessage();\n } \n \n $this->getResponse()->clearHeaders()->setHeader('Content-type','application/json',true)->setBody(Mage::helper('core')->jsonEncode($result));\n \n }", "public function getProducts() {\n\t\treturn $this->requester->request('GET', $this->url);\n\t}", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function getProducts($options = array())\n {\n $return = $this->getListe(\"products\", $options);\n return $return;\n }", "public function getOptions()\n { return $this->get('options'); }", "public function getProducts_options_values() {\n\t\treturn $this->products_options_values;\n\t}", "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 }", "protected function getOptions() {}" ]
[ "0.8232958", "0.7722287", "0.7475715", "0.6926583", "0.69037056", "0.6831782", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6676823", "0.6649442", "0.6648424", "0.6648424", "0.6643593", "0.6642509", "0.65896916", "0.657428", "0.6478002" ]
0.8249201
0
Get options for product endpoint.
public static function getProductOptions() { return self::get('product') ?: []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getProductsOptions()\n {\n return self::get('products') ?: [];\n }", "public function getProductOption();", "public function getProducts_options() {\n\t\treturn $this->products_options;\n\t}", "public function getOptionList()\n {\n return Mage::helper('bundle/catalog_product_configuration')->getOptions($this->getItem());\n }", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function optionAction() \n {\n $result = array();\n \n $productIdOrSku = $this->getRequest()->getParam('product');\n $attributeOptionId = $this->getRequest()->getParam('id');\n\n try {\n \n $model = $this->getModel();\n $model->loadOptions($productIdOrSku, $attributeOptionId);\n $options = $model->getApiOptions(); \n \n $result = $options;\n \n \n } catch (Exception $e) {\n \n $result['error'] = true;\n $result['data'] = $e->getMessage();\n } \n \n $this->getResponse()->clearHeaders()->setHeader('Content-type','application/json',true)->setBody(Mage::helper('core')->jsonEncode($result));\n \n }", "public function getOptions()\n { return $this->get('options'); }", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "abstract public function getOptions();", "public function getOptions()\r\n {\r\n }" ]
[ "0.7604395", "0.75408506", "0.7381102", "0.7118237", "0.71144694", "0.7113813", "0.7113813", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.7113068", "0.71072364", "0.7042209", "0.69687545", "0.6968525", "0.6968525", "0.6957881", "0.6912884" ]
0.79135555
0
Registers an event to be published when the aggregate is saved, containing the given payload and optional metadata.
protected function registerEvent($payload, $metadata = null) { if ($payload instanceof AbstractDomainEvent && null === $payload->aggregateId) { $payload->setAggregateId($this->getId()); } return $this->getEventContainer() ->addEvent($payload, $metadata); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function push($event, $payload = array())\n {\n $this->listen($event .'_pushed', function() use ($event, $payload)\n {\n $this->dispatch($event, $payload);\n });\n }", "public function publish($event, $bus);", "public function register($slug, $args = [], $description = \"\") {\n if (!$this->event_exists($slug)) {\n $this->events[$slug] = [];\n $this->events[$slug][\"args\"] = $args;\n $this->events[$slug][\"description\"] = $description;\n $this->events[$slug][\"listeners\"] = [];\n }\n else{\n $this->msg(\"Event \\\"{$slug}\\\" already exists\");\n }\n }", "public function storeEvent($event)\n {\n $this->entityManager->persist($event);\n $this->entityManager->flush();\n }", "public function storeEvent(){\n \t$eventStore = new Event_Store();\n\n\t\t$eventStore->command = $this->command; \t\n\t\t$eventStore->event = $this->event;\n\t\t$eventStore->status = \"published\";\n\t\t$eventStore->created_at = now();\n\t\t$eventStore->updated_at = now();\n\n\n\t\t$eventStore->save();\n }", "public function publish($event, $typeHint = null);", "public function addPayload($payload)\n {\n $this->payload = $payload;\n }", "public function save() {\n\t\tglobal $wpdb;\n\n\t\t$defaults = array(\n\t\t\t\t'id' => null,\n\t\t\t\t'slug' => null,\n\t\t\t\t'payload' => null,\n\t\t\t\t'remote_host' => null,\n\t\t\t\t'remote_ip' => null,\n\t\t\t\t'timestamp' => date( \"Y-m-d H:i:s\" ),\n\t\t\t);\n\t\t$data = array_merge( $defaults, (array)$this->data );\n\n\t\tif ( empty( $data['slug'] ) )\n\t\t\treturn new WP_Error( 'invalid-arguments', \"'slug' is a required argument.\" );\n\n\t\tif ( ! empty( $data['remote_ip'] ) )\n\t\t\t$data['remote_ip'] = ip2long( $data['remote_ip'] );\n\n\t\tif ( empty( $data['id'] ) ) {\n\t\t\tunset( $data['id'] );\n\t\t\t$ret = $wpdb->insert( $wpdb->notify_events, $data );\n\t\t\t$data['id'] = (int) $wpdb->insert_id;\n\t\t} else {\n\t\t\t$ret = $wpdb->update( $wpdb->notify_events, $data, array( 'id' => $data['id'] ) );\n\t\t}\n\n\t\tif ( ! empty( $data['remote_ip'] ) )\n\t\t\t$data['remote_ip'] = long2ip( $data['remote_ip'] );\n\n\t\tif ( $ret ) {\n\t\t\t$this->data = (object)$data;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn new WP_Error( 'mysql-failure', \"Couldn't insert/update event into database.\" );\n\t\t}\n\t}", "public function recordEvent($eventName, $payload)\n {\n if (! Telescope::isRecording() || $this->shouldIgnore($eventName)) {\n return;\n }\n\n $formattedPayload = $this->extractPayload($eventName, $payload);\n\n Telescope::recordEvent(IncomingEntry::make([\n 'name' => $eventName,\n 'payload' => empty($formattedPayload) ? null : $formattedPayload,\n 'listeners' => $this->formatListeners($eventName),\n 'broadcast' => class_exists($eventName)\n ? in_array(ShouldBroadcast::class, (array) class_implements($eventName))\n : false,\n ])->tags(class_exists($eventName) && isset($payload[0]) ? ExtractTags::from($payload[0]) : []));\n }", "public function eventPayload($payload)\n {\n $this->eventPayload = $payload;\n\n return $this;\n }", "public function setPayload($payload);", "public function store(Request $request)\n {\n $events = new Event();\n $events->type = $request->type;\n $events->title = $request->title;\n $events->description = $request->description;\n $save = $events->save();\n if ($save) {\n Auth::guard('admin')->user()->notify(new EventNotification($events));\n return redirect()->back()->with('success', 'Event has been add successfully');\n } else {\n return redirect()->back()->with('error', 'Something went wrong!');\n }\n }", "public function store($payload)\n {\n $payload['name'] = htmlentities($payload['name']);\n\n return $this->model->create($payload);\n }", "public function givenAPublished($event);", "protected function _registerEvent(Mage_Index_Model_Event $event)\n\t{\n\t\tif ($event->getEntity() == Asm_Solr_Model_Cms_Page::ENTITY\n\t\t\t&& $event->getType() == Mage_Index_Model_Event::TYPE_SAVE\n\t\t) {\n\t\t\t$event->setData('solr_update_page_id', $event->getDataObject()->getId());\n\t\t}\n\t}", "public function register( \\Aimeos\\MW\\Observer\\Publisher\\Iface $p );", "public function store(CreateEventRequest $request)\n {\n $event = $this->event_repo->save(\n $request->all(),\n (new EventFactory())->create(auth()->user(), auth()->user()->account_user()->account)\n );\n Notification::send(auth()->user(), new EventCreated($event));\n return $event->toJson();\n }", "public function saveAction()\r\n\t{\r\n\t\t$eventId = $this->getRequest()->getParam('event_id');\r\n\t\t$eventModel = Mage::getModel('master_example/event')->load($eventId);\r\n\r\n\t\tif($data = $this->getRequest()->getPost()){\r\n\t\t\ttry{\r\n\t\t\t\t$eventModel->addData($data)\r\n\t\t\t\t\t->save();\r\n\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess($this->__(\"your event has been saved\"));\r\n\t\t\t} catch (Exception $e){\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->setEventFormData($data); // persist the values\r\n\t\t\t\t$this->_redirect('*/*/edit', array('_current' => true));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->_redirect('*/*/index');\t\r\n\t}", "public function store()\n\t{\n\t\t\t\n\t\t\t$event = new EventData();\n\t\t\t$event->message_severity = Input::get('message_severity');\n\t\t\t$publisherCode = Input::get('publisher_code');\n\t\t\t$typeCode = Input::get('type_code');\n\t\t\t$eventData = Input::get('event_data');\n\t\t\t\n\t\t\t$publishers = DB::table('event_publishers')->where('publisher_code', '=', $publisherCode)->get();\n\t\t\t$publisherId = null;\n\t\t\tforeach ($publishers as $publisher)\n\t\t\t{\n\t\t\t\t$publisherId = $publisher->id;\n\t\t\t}\n\t\t\tif (is_null($publisherId)) {\n\t\t\t\treturn Response::json(array('error' => true, 'message' => 'Publisher Code does not exist.'), 400);\n\t\t\t}\n\t\t\tif (is_null($typeCode)) {\n\t\t\t\treturn Response::json(array('error' => true, 'message' => 'Event Type Code is required.'), 400);\n\t\t\t}\n\t\t\tif (is_null($eventData)) {\n\t\t\t\treturn Response::json(array('error' => true, 'message' => 'Event Data is required.'), 400);\n\t\t\t}\n\t\t\t\t\n\t\t\t$event->event_publisher_id = $publisherId;\n\t\t\t$event->event_type_code = $typeCode;\n\t\t\t\n\t\t\t$event->event_data = json_encode($eventData);\n\t\t\t\n\t\t\t$event->save();\n\t\t\t\n\t\t\tNotificationRulesProcessor::processRule($event,'api');\n\t\t\treturn Response::json(array('error' => false,'event' => $event->toArray()),200);\n\t}", "public function addEventSubscriber(IEventSubscriber $subscriber);", "public function registerPublishedBuild($save = true) {\n $this->lastPublished = new \\DateTime();\n if ($save)\n $this->save();\n }", "public function postPersist(LifecycleEventArgs $args): void\n {\n // Get the object and make sure it is what we need.\n $object = $args->getObject();\n if (!$object instanceof PublishableInterface) {\n return;\n }\n\n // Execute published event after the object is persisted.\n if ($object->isPublished()) {\n $event = new EntityPublishedEvent($object);\n $this->event_dispatcher->dispatch(EntityPublishedEvent::NAME, $event);\n }\n }", "public function store(Request $request)\n {\n $request->validate([\n 'title' =>'required|string|max:255',\n 'date' =>'required|date',\n 'time' =>'required',\n 'image' =>'required|file',\n 'description' =>'required'\n ]);\n\n $event = Event::create($request->all());\n\n return (new EventResource($event))\n ->response()\n ->setStatusCode(201);\n }", "function eventRegister($eventName, EventListener $listener);", "public function save(Domain\\AggregateRoot $aggregateRoot)\r\n {\r\n }", "public function addSubscriber(EventSubscriberInterface $subscriber);", "protected function expectAddEvent()\n {\n $this->eventPublisher->expects($this->once())\n ->method('addEvent')\n ->with(['uuid' => '123']);\n }", "private function registerEventStore() : void\n {\n $this->app->bind(IlluminateEventStore::class, function ($app) {\n $connection = $app->make(Connection::class);\n $serializer = $app->make(Serializer::class);\n $eventStoreTable = $app->config->get('event_sourcing.event_store_table');\n\n return new IlluminateEventStore(\n $connection,\n $serializer,\n $eventStoreTable\n // decorators (we could decorate the stream with account_id)\n );\n });\n\n $this->app->bind(\n EventStore::class,\n IlluminateEventStore::class\n );\n }", "public static function saved($event) {\n\n\t\t$account = $event->getSubject();\n\t\t$new = $event['new'];\n\n\t}", "public function save()\n {\n $data = [\n 'eventKey' => $this->eventKey,\n 'eventType' => $this->getEventType(),\n 'eventAction' => $this->getEventAction(),\n 'eventSubjectID' => $this->getSubjectID(),\n 'eventSubjectData' => trim($this->getSubjectData()),\n 'eventUserID' => ($this->user) ? $this->user->id() : 0,\n 'eventTriggered' => date('Y-m-d H:i:s')\n ];\n\n $PerchAPI = new PerchAPI(1.0, 'redfinch_logger');\n $Events = new RedFinchLogger_Events($PerchAPI);\n\n return $Events->create($data);\n }" ]
[ "0.5790317", "0.5744322", "0.5651529", "0.5641642", "0.5621258", "0.560686", "0.5526483", "0.5516685", "0.5459593", "0.53452635", "0.53317636", "0.51465344", "0.5091057", "0.50896096", "0.5042483", "0.50397635", "0.50018495", "0.49942774", "0.49684134", "0.4965024", "0.4951837", "0.4930787", "0.49267155", "0.4921911", "0.49205318", "0.49146944", "0.48853725", "0.4873547", "0.48734435", "0.4854031" ]
0.7300139
0
Get raw data array.
public function getRawData();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRawData() {}", "public function getData()\n {\n return $this->raw;\n }", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public static function getRawData()\n {\n return self::$rawData;\n }", "public function toArray(): array\n {\n return $this->rawData;\n }", "protected abstract function getData(): array;", "public function get_raw_data() {\n\t\treturn $this->raw_data;\n\t}", "public function getData() : array;", "public function getData() : array;", "public function getData () : array {\n\t\treturn $this->data;\n\t}", "public function getRawData() {\n return $this->rawData;\n }", "public function getData() : array\n {\n return $this->data;\n }", "public function getData() : array\n {\n return $this->data;\n }", "public function getData() : array\n {\n return $this->data;\n }", "public function getRaw() : array\n {\n return $this->raw;\n }", "public function getRawData()\n\t{\n\n\t\treturn @file_get_contents($this->tmpFileName);\n\n\t}", "public function getData()\n {\n return array(\n\n );\n }", "public static function get_raw_data()\n {\n }", "public static function get_raw_data()\n {\n }", "public function getRaw(): array\n {\n return $this->raw;\n }", "private function getDataArray() {\n\t\treturn $this->dataArray;\n\t}", "public function get_data(): array;", "public function get_data(): array;", "public function getArray() {\n\t\treturn $this->data; \n\t}", "public function getArray() {\n\t\treturn $this->data; \n\t}", "public function getData(): array\n {\n return $this->data;\n }", "public function getData(): array\n {\n return $this->data;\n }" ]
[ "0.8163359", "0.78400236", "0.77813596", "0.77813596", "0.77813596", "0.77813596", "0.7756806", "0.7741698", "0.76840156", "0.7661394", "0.75895286", "0.75895286", "0.7582252", "0.75677174", "0.7556133", "0.7556133", "0.7556133", "0.7546974", "0.7544819", "0.7520431", "0.7506771", "0.7506771", "0.7495326", "0.747023", "0.7428329", "0.7428329", "0.74021566", "0.74021566", "0.7382738", "0.7382738" ]
0.82051533
1
Set formatted data array.
public function setFormattedData($formatted_data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formatData(array $data)\n {\n $this->data = json_encode($data);\n }", "public function setFromArray(array &$_data);", "public function setFromArray(array $data);", "public function setData(Array $data);", "public function setData(array $data);", "public function setData(array $data);", "public function setData(array $data);", "public function setData(array $data) {\n\t\t$this->_data = $data;\n\t}", "public function setData(array $data = []);", "public function setData(Array $data)\n {\n $this->data_view = array_merge_recursive($this->data_view, $data);\n }", "public function setData (array $data) : void {\n\t\t$this->data = $data;\n\t}", "private function setFormatData(string $file) {\n\n $data = $this->setFormatContent($file);\n\n $this->headers = count($data) > 0 ? $data[0] : [];\n unset($data[0]);\n\n $this->data = array_values($data);\n unset($data);\n }", "public function setData(array $data)\n {\n $this->data = $data;\n }", "public function setData(array $data)\n {\n $this->data = $data;\n }", "public function setData(array $data)\n {\n $this->data = $data;\n }", "public function setData(array $data)\n {\n $this->data = $data;\n }", "abstract protected function setFormat();", "public function setArray($data)\n {\n return $this->importArray($data);\n }", "public function setFromArray(array &$_data)\n {\n parent::setFromArray($_data);\n \n if (isset($_data['flatpath'])) {\n $this->_parsePath($_data['flatpath']);\n }\n }", "protected function setData(array $data)\n\t{\n\t\t$this->json_data = $data;\n\t}", "protected abstract function formatArrayValue(array $value);", "function _set_from_array($data, $set_heading = TRUE)\n\t{\n\t\tif ( ! is_array($data) OR count($data) == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$i = 0;\n\t\tforeach ($data as $row)\n\t\t{\n\t\t\t// If a heading hasn't already been set we'll use the first row of the array as the heading\n\t\t\tif ($i == 0 AND count($data) > 1 AND count($this->heading) == 0 AND $set_heading == TRUE)\n\t\t\t{\n\t\t\t\t$this->heading = $this->_prep_args($row);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->rows[] = $this->_prep_args($row);\n\t\t\t}\n\n\t\t\t$i++;\n\t\t}\n\t}", "protected function setDataSetString() {\n\t\tif(!utility::isArrayEmpty($this->values)) {\n\t\t\t$this -> setProperty('chd', $this->getEncodingType().':'.$this->encodeData($this->values,',',$this->getEncodingType()));\n\t\t}\n\t}", "public function setData($data = array())\n {\n $this->data = (string) $data;\n\n $this->update();\n }", "public function setDataArray($dataArray = array()) {\n\t\t$this->dataArray = $dataArray;\n\t}", "private function setData() {\n $this->Data = array_map('strip_tags', $this->Data);\n $this->Data = array_map('trim', $this->Data);\n }", "public function setData (array $data) {\n return $this->setField('data', array_merge($this->data, $data));\n }", "private function formatData() {\n\t\t// Initialise arr variable\n\t\t$str = array();\n\n\t\t// Step through the fields\n\t\tforeach($this->data as $key => $value){\n\t\t\t// Stick them together as key=value pairs (url encoded)\n\t\t\t$str[] = $key . '=' . urlencode($value);\n\t\t}\n\n\t\t// Implode the arry using & as the glue and store the data\n\t\t$this->curl_str = implode('&', $str);\n\t}", "public function fromArray($data)\n {\n $this->data = $data;\n\n\n }", "public function data(array $data)\n\t{\n\t\tself::$__data = array_merge(self::$__data, $data);\n\t}" ]
[ "0.7183745", "0.6917905", "0.6846041", "0.6757843", "0.6600288", "0.6600288", "0.6600288", "0.6375393", "0.63494265", "0.62377405", "0.62374145", "0.62307835", "0.62186104", "0.62186104", "0.62186104", "0.62186104", "0.62103075", "0.6199522", "0.61931646", "0.6192093", "0.61286664", "0.60756314", "0.6057257", "0.6029066", "0.6025707", "0.59822613", "0.597451", "0.5970981", "0.59612536", "0.5928787" ]
0.70812774
1
Get the email key.
public static function getEmailKey($tracking_method = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEmailKey() {\n\t\treturn $this->getData('emailKey');\n\t}", "function getEmailId() {\n\t\treturn $this->getData('emailId');\n\t}", "private function getKey() {\n\t\tif ( !$this->key )\n\t\t\t$this->key = \"mvn-maillists-\" . sanitize_key( $this->getName() );\n\n\t\treturn $this->key;\n\t}", "public function get_key ()\n {\n $_key = $this->key;\n\n if ( ! empty( $_key ) && is_array( $_key ) )\n {\n $_key = join( ':', $_key );\n }\n\n return sanitise_key( $_key );\n }", "public function getEmail()\n {\n if (array_key_exists(\"email\", $this->_propDict)) {\n return $this->_propDict[\"email\"];\n } else {\n return null;\n }\n }", "public function getAuthKey()\n {\n return sha1($this->hash_password . $this->email . 'sfjds9IFJdke323');\n }", "public function getKey(): string\n {\n return $this->key;\n }", "public function getKey()\n {\n return $this->__get(\"key\");\n }", "public function getKey()\n {\n return isset($this->key) ? $this->key : '';\n }", "public function getKey()\n {\n return isset($this->key) ? $this->key : '';\n }", "function get_key() {\n\t\t// get_cert() also fetches key\n\t\tif (!isset($_SESSION['user_key']))\n\t\t\t$this->get_cert();\n\t\treturn $_SESSION['user_key'];\n\t}", "public function getAuthIdentifier() {\r\n return $this -> getKey();\r\n }", "public function getKey()\n\t{\n\t\tif (defined('AKEEBA_SERVERKEY'))\n\t\t{\n\t\t\treturn base64_decode(AKEEBA_SERVERKEY);\n\t\t}\n\n\t\t$filename = dirname(__FILE__) . '/../' . $this->keyFilename;\n\n\t\tif (file_exists($filename))\n\t\t{\n\t\t\tinclude_once $filename;\n\t\t}\n\n\t\tif (defined('AKEEBA_SERVERKEY'))\n\t\t{\n\t\t\treturn base64_decode(AKEEBA_SERVERKEY);\n\t\t}\n\n\t\treturn '';\n\t}", "public function getEmail()\n {\n return $this->get(self::EMAIL);\n }", "public function getIdentity(): string\n {\n return $this->email;\n }", "public function getKey()\n {\n return $this->get(self::KEY);\n }", "public function getKey()\n {\n return $this->get(self::KEY);\n }", "public function getKey(): string;", "public function getKey(): string;", "public function getAuthIdentifier() {\n\t\treturn $this -> getKey();\n\t}", "public function GetKey() {\n\t\treturn $this->_key;\n\t}", "public function getExtkey() {}", "public function getKey() : string\n {\n return $this->key;\n }", "public function getEmail()\n {\n return $this->getParam(self::EMAIL);\n }", "private function getMaillistKey() {\n\t\tif ( !$this->maillistKey )\n\t\t\t$this->maillistKey = \"mvn-maillists-\" . sanitize_key( $this->getName() );\n\n\t\treturn $this->maillistKey;\n\t}", "protected function _getKey() {\n\n $key = md5($this->_password, true);\n\n return $key;\n\n }", "public function getPasswordResetKey()\n {\n return $this->definition->getPasswordResetKey($this);\n }", "private static function Get_Memcache_Key($val) {\n\t\tswitch (TRUE) {\n\t\t\tcase ($val instanceof FApplication):\n\t\t\t\t$email = $val->get('email');\n\t\t\t\tbreak;\n\t\t\tcase (is_array($val)):\n\t\t\t\t$email = $val['email'];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$email = $val;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif ($email) {\n\t\t\treturn strtolower(trim(self::$memcache_key_prefix . $email));\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getAuthKey()\n {}", "public function findEmailByKey($key)\r\n {\r\n $column = 'email';\r\n\r\n return $this->db->select($column)\r\n ->from(self::getTableName())\r\n ->whereEquals('key', $key)\r\n ->query($column);\r\n }" ]
[ "0.8846848", "0.72901225", "0.6949957", "0.68924683", "0.6844382", "0.6832427", "0.6803062", "0.6773031", "0.6751315", "0.6751315", "0.66886264", "0.66882163", "0.66881645", "0.66864604", "0.66756535", "0.66611224", "0.66611224", "0.6658664", "0.6658664", "0.66254276", "0.6620826", "0.6620395", "0.6619066", "0.6610364", "0.6605701", "0.6595406", "0.6582286", "0.6569362", "0.6566902", "0.65665054" ]
0.73549336
1
Format the data based on tracking method.
public function formatData() { $raw_data = $this->getRawData(); $formatted_data = array(); // Format the data based on tracking method. switch ($this->getTrackingMethod()) { case 'rest': // Replace marketo_id with value of MARKETO_REST_LEAD_FIELD_REST_KEY. foreach ($raw_data as $id => $value) { // Get the row corresponding to the marketo id. $result = db_select(MARKETO_REST_SCHEMA_LEAD_FIELDS) ->fields(MARKETO_REST_SCHEMA_LEAD_FIELDS) ->condition(MARKETO_REST_LEAD_FIELD_ID, $id) ->execute() ->fetchAll(); // Cycle through the result row(s) and set the new rest field key. foreach ($result as $field) { if (isset($field->{MARKETO_REST_LEAD_FIELD_REST_KEY})) { $formatted_data[$field->{MARKETO_REST_LEAD_FIELD_REST_KEY}] = $value; } } } break; case 'munchkin': default: // Replace marketo_id with value of MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY. foreach ($raw_data as $id => $value) { // Get the row corresponding to the marketo id. $result = db_select(MARKETO_REST_SCHEMA_LEAD_FIELDS) ->fields(MARKETO_REST_SCHEMA_LEAD_FIELDS) ->condition(MARKETO_REST_LEAD_FIELD_ID, $id) ->execute() ->fetchAll(); // Cycle through the result row(s) and set the new munchkin field key. foreach ($result as $field) { if (isset($field->{MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY})) { $formatted_data[$field->{MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY}] = $value; } } } break; } return $formatted_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormattedData();", "public function formatData(){\n $from = $this->dataObject->getFrom();\n\n // prepare array for counterxmlbuild with vendor informations\n $data = array(\n 'Report' => array (\n 0 => array(\n // Report attributes\n 'Created' => date('Y-m-d\\TH:i:s'),\n 'ID' => 'ID01', //TODO\n 'Version' => $this->dataObject->getVersion(),\n 'Name' => $this->dataObject->getReportName(),\n 'Title' => $this->dataObject->getReportTitle(),\n // Vendor node\n 'Vendor' => array(\n 'Name' => VENDOR_NAME,\n 'ID' => VENDOR_ID,\n 'Contact' => array(\n 0 => array(\n 'Contact' => VENDOR_CONTACT_NAME,\n 'E-mail' => VENDOR_CONTACT_MAIL\n ),\n ),\n 'WebSiteUrl' => VENDOR_WEBSITEURL,\n 'LogoUrl' => VENDOR_LOGOURL,\n ),\n ),\n ),\n );\n\n // prepare with customer informations\n $data['Report'][0]['Customer'][0] = $this->dataObject->getCustomerInfo();\n\n $j=0; // ReportItem\n $y=0; // ItemPerfomance\n $previousIdentifier = '';\n $count = 0;\n\n foreach ($this->dataObject->getData() as $row) {\n if (!($row['identifier'] == $previousIdentifier)) {\n // next Reportitem\n $j++;\n // reset ItemPerfomance\n $y=0;\n\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPlatform'] = 'TODO'; //TODO\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemDataType'] = 'TODO'; //TODO\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemName'] = $row['identifier'];\n }\n\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Period']['Begin'] = date('Y-m-d', strtotime($row['date']));\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Period']['End'] = date('Y-m-d', strtotime('last day of this month', strtotime($row['date'])));\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Category'] = 'TODO'; //TODO\n\n // check for different counts\n $x=0; // Instance\n\n // TODO: implement/translate format for different metric types\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Instance'][$x]['MetricType'] = 'ft_total';\n $data['Report'][0]['Customer'][0]['ReportItems'][$j]['ItemPerformance'][$y]['Instance'][$x]['Count'] = $row['counter'];\n\n $y++; //next ItemPerformance\n $previousIdentifier = $row['identifier'];\n $count++;\n }\n\n $counterxmlbuild = new CounterXMLBuilder();\n $counterxmlbuild->setIndentString(\"\\t\");\n $counterxmlbuild->start();\n $counterxmlbuild->add_reports($data);\n $counterxmlbuild->done();\n return $this->formattedData = $counterxmlbuild->outputMemory();\n }", "public function format($data);", "public function format($data);", "public function format() { \n\n\t\t$this->f_start = inet_ntop($this->start); \n\t\t$this->f_end = inet_ntop($this->end); \n\n\t\t$this->f_user = $this->get_user_name(); \n\t\t$this->f_level = $this->get_level_name(); \n\t\t$this->f_type = $this->get_type_name(); \n\n\t}", "private function formatData() {\n\t\t// Initialise arr variable\n\t\t$str = array();\n\n\t\t// Step through the fields\n\t\tforeach($this->data as $key => $value){\n\t\t\t// Stick them together as key=value pairs (url encoded)\n\t\t\t$str[] = $key . '=' . urlencode($value);\n\t\t}\n\n\t\t// Implode the arry using & as the glue and store the data\n\t\t$this->curl_str = implode('&', $str);\n\t}", "public function format()\n\t{\n\t\t// Get the event data\n\t\t$channel_data = & Swiftriver_Event::$data;\n\t\t\n\t\tif (isset($channel_data['channel']) AND $channel_data['channel'] == 'twitter')\n\t\t{\n\t\t\t$parameters = $channel_data['parameters']['value'];\n\t\t\t\n\t\t\tif (isset($parameters['user']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= 'From: '.$parameters['user'];\n\t\t\t}\n\t\t\tif (isset($parameters['keyword']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= ' Keywords: '.$parameters['keyword'];\n\t\t\t}\n\t\t\tif (isset($parameters['location']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= ' Location: '.$parameters['location'];\n\t\t\t}\n\t\t}\n\t}", "public function getDataToBeFormatted(){\n\t\t\treturn $this->setDataToBeFormatted();\n\t\t}", "public function organizeData()\n {\n $this->data = [\n ['name' => '商城名称', 'value' => \\Setting::get('shop.shop')['name']],\n ['name' => '粉丝昵称', 'value' => $this->member['nickname']],\n ['name' => '退款单号', 'value' => $this->refund->refund_sn],\n ['name' => '退款申请时间', 'value' => $this->refund->create_time->toDateTimeString()],\n ['name' => '退款方式', 'value' => $this->order->pay_type_name],\n ['name' => '退款金额', 'value' => $this->refund->price],\n ['name' => '退款原因', 'value' => $this->refund->reason],\n ];\n }", "public function get_tracker_data() {\n\t\t$option_object = $this->get_analytics_options();\n\n\t\t// Look for a site level Google Analytics ID\n\t\t$google_analytics_id = get_option( 'wsuwp_ga_id', false );\n\n\t\t// Look for a site level Google Analytics ID\n\t\t$ga4_google_analytics_id = get_option( 'wsuwp_ga4_id', false );\n\n\t\t// If a site level ID does not exist, look for a network level Google Analytics ID\n\t\tif ( ! $google_analytics_id ) {\n\t\t\t$google_analytics_id = get_site_option( 'wsuwp_network_ga_id', false );\n\t\t}\n\n\t\t// Provide this via filter in your instance of WordPress. In the WSUWP Platform, this will\n\t\t// be part of a must-use plugin.\n\t\t$app_analytics_id = apply_filters( 'wsu_analytics_app_analytics_id', '' );\n\n\t\t$spine_color = '';\n\t\t$spine_grid = '';\n\t\t$wsuwp_network = '';\n\n\t\tif ( function_exists( 'spine_get_option' ) ) {\n\t\t\t$spine_color = esc_js( spine_get_option( 'spine_color' ) );\n\t\t\t$spine_grid = esc_js( spine_get_option( 'grid_style' ) );\n\t\t}\n\n\t\tif ( is_multisite() ) {\n\t\t\t$wsuwp_network = get_network()->domain;\n\t\t}\n\n\t\t// Do not track site analytics on admin or preview views.\n\t\tif ( is_admin() || is_preview() ) {\n\t\t\t$option_object['track_site'] = false;\n\t\t}\n\n\t\t// Escaping of tracker data for output as JSON is handled via wp_localize_script().\n\t\t$tracker_data = array(\n\t\t\t'defaults' => array(\n\t\t\t\t'cookieDomain' => $this->get_cookie_domain(),\n\t\t\t),\n\n\t\t\t'wsuglobal' => array(\n\t\t\t\t'ga_code' => 'true' === $option_object['track_global'] ? 'UA-55791317-1' : false, // Hard coded global analytics ID for WSU.\n\t\t\t\t'campus' => $option_object['campus'],\n\t\t\t\t'college' => $option_object['college'],\n\t\t\t\t'unit_type' => $option_object['unit_type'],\n\t\t\t\t// Fallback to the subunit if a unit is not selected.\n\t\t\t\t'unit' => 'none' === $option_object['unit'] && 'none' !== $option_object['subunit'] ? $option_object['subunit'] : $option_object['unit'],\n\t\t\t\t// If a subunit has been used as a fallback, output \"none\" as the subunit.\n\t\t\t\t'subunit' => 'none' !== $option_object['unit'] ? $option_object['subunit'] : 'none',\n\t\t\t\t'is_editor' => $this->is_editor() ? 'true' : 'false',\n\t\t\t\t'track_view' => is_admin() ? 'no' : 'yes',\n\t\t\t\t'events' => array(),\n\t\t\t),\n\n\t\t\t'app' => array(\n\t\t\t\t'ga_code' => 'true' === $option_object['track_app'] ? $this->sanitize_ga_id( $app_analytics_id ) : false,\n\t\t\t\t'page_view_type' => $this->get_page_view_type(),\n\t\t\t\t'authenticated_user' => $this->get_authenticated_user(),\n\t\t\t\t'user_id' => ( is_admin() ) ? get_current_user_id() : 0,\n\t\t\t\t'server_protocol' => $_SERVER['SERVER_PROTOCOL'],\n\t\t\t\t'wsuwp_network' => $wsuwp_network,\n\t\t\t\t'spine_grid' => $spine_grid,\n\t\t\t\t'spine_color' => $spine_color,\n\t\t\t\t'events' => array(),\n\t\t\t),\n\n\t\t\t'site' => array(\n\t\t\t\t'ga_code' => 'true' === $option_object['track_site'] ? $google_analytics_id : false,\n\t\t\t\t'ga4_code' => $ga4_google_analytics_id,\n\t\t\t\t'track_view' => is_admin() ? 'no' : 'yes',\n\t\t\t\t'events' => array(),\n\t\t\t),\n\t\t);\n\n\t\treturn $tracker_data;\n\t}", "public function formatData()\n\t{\n\t\tif(request()->get('by') != 'zone') {\n\t\t\t$this['values'] = explode(',', strtoupper($this['values']));\n\t\t}\n\n\t\t$this['end_date'] = Carbon::createFromFormat('Y-m-d H:i', $this['end_date'], 'Europe/Madrid');\n\n\t\t$this['start_date'] = $this['end_date']->copy()->subHours(\n\t\t\tconfig('filter.for')[$this['for']]['hours']\n\t\t);\n\n\t\treturn $this;\n\t}", "public function trackingProvider()\n {\n return [[1.1], [1]];\n }", "public function trackingProvider()\n {\n return [[1.1], [1]];\n }", "public function ReportesData(){\n\t\t$this->status=\"1\";\n\t\t$this->created_at = \"NOW()\";\n\t}", "public function tracking_field() {\n\t\techo cyprus_get_settings( 'mts_analytics_code' );\n\t}", "public function getStatusData()\r\n\t{\r\n\t\t$data = array(\r\n\t\t\t'source' => array(\r\n\t\t\t\t'a' => array(\r\n\t\t\t\t\t'selected' => false,\r\n\t\t\t\t\t'preferred' => false,\r\n\t\t\t\t\t'voltage' => false,\r\n\t\t\t\t\t'frequency' => false,\r\n\t\t\t\t\t'status' => false,\r\n\t\t\t\t),\r\n\t\t\t\t'b' => array(\r\n\t\t\t\t\t'selected' => false,\r\n\t\t\t\t\t'preferred' => false,\r\n\t\t\t\t\t'voltage' => false,\r\n\t\t\t\t\t'frequency' => false,\r\n\t\t\t\t\t'status' => false,\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'phaseSynchronization' => false,\r\n\t\t\t'totalLoad' => false,\r\n\t\t\t'totalPower' => false,\r\n\t\t\t'peakLoad' => false,\r\n\t\t\t'energy' => false,\r\n\t\t\t'powerSupplyStatus' => false,\r\n\t\t\t'communicationStatus' => false,\r\n\t\t);\r\n\r\n\t\t$this->hr->get('/status_update.html');\r\n\r\n\t\tif ($this->hr->result) {\r\n\t\t\t// selected source\r\n\t\t\tif (preg_match('/selected source<\\/span>\\s*<span class=\"txt\">source\\s+([a-z])/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$source = strtolower($matches[1]);\r\n\t\t\t\t$data['source'][$source]['selected'] = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// preferred source\r\n\t\t\tif (preg_match('/preferred source<\\/span>\\s*<span class=\"txt\">source\\s+([a-z])/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$source = strtolower($matches[1]);\r\n\t\t\t\t$data['source'][$source]['preferred'] = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// source voltage\r\n\t\t\tif (preg_match('/source voltage \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)\\s*\\/?\\s*([0-9\\.]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['voltage'] = $matches[1];\r\n\t\t\t\t$data['source']['b']['voltage'] = $matches[2];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// frequency\r\n\t\t\tif (preg_match('/source frequency \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)\\s*\\/?\\s*([0-9\\.]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['frequency'] = $matches[1];\r\n\t\t\t\t$data['source']['b']['frequency'] = $matches[2];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// status\r\n\t\t\tif (preg_match('/source status \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([a-z]+)\\s*\\/?\\s*([a-z]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['status'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t\t$data['source']['b']['status'] = ($matches[2] == 'OK') ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t// phase sync\r\n\t\t\tif (preg_match('/phase synchronization<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['phaseSynchronization'] = ($matches[1] == 'No') ? false : true;\r\n\t\t\t}\r\n\r\n\t\t\t// total load\r\n\t\t\tif (preg_match('/total\\s+load<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['totalLoad'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// total power\r\n\t\t\tif (preg_match('/total\\s+power<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['totalPower'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// peak load\r\n\t\t\tif (preg_match('/peak\\s+load<\\/span>\\s*<span class=\"l2b txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['peakLoad'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// energy\r\n\t\t\tif (preg_match('/energy<\\/span>\\s*<span class=\"l2b txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['energy'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// PS status\r\n\t\t\tif (preg_match('/power supply status<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['powerSupplyStatus'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t// comm status\r\n\t\t\tif (preg_match('/communication status<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['communicationStatus'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "protected function _formatData($data) {\n $data['Headers'] = Hash::combine($data, 'Headers.{n}.Name', 'Headers.{n}.Value');\n return $data;\n }", "public function logData() {\n\t\t/* Implement in subclasses */\n\t}", "public function getStandardJsonFormat(){\n return VoucherValidationLogTransformer::transform($this->prepareVoucherValidationLogGreedyData());\n }", "public static function format($info_array, $data_type)\n {\n }", "abstract function format();", "public function format(): array\n {\n if ($this->groupEvent) {\n // Events are grouped only in API version 2.\n $this->version = 2;\n }\n\n $result = [\n 'Url' => $this->url,\n 'EventType' => $this->type,\n 'IsBackup' => $this->isBackup,\n 'Status' => $this->status,\n 'Version' => $this->version,\n ];\n\n if ($this->apiKeyId) {\n $result['APIKeyID'] = $this->apiKeyId;\n }\n\n return $result;\n }", "public function organizeData()\n {\n $this->data = [\n \"thing2\" => ['value'=>'申请通过'],\n \"date1\" => ['value'=>date(\"Y-m-d H:i:s\",time())],\n ];\n }", "public function get_formatted_tracking_item( $order_id, $tracking_item ) {\n\t\t$formatted = array();\n\n\t\tif ( version_compare( WC_VERSION, '3.0', '<' ) ) {\n\t\t\t$postcode = get_post_meta( $order_id, '_shipping_postcode', true );\n\t\t} else {\n\t\t\t$order = new WC_Order( $order_id );\n\t\t\t$postcode = $order->get_shipping_postcode();\n\t\t}\n\n\t\t$formatted['formatted_tracking_provider'] = '';\n\t\t$formatted['formatted_tracking_link'] = '';\n\n\t\tif ( empty( $postcode ) ) {\n\t\t\t$postcode = get_post_meta( $order_id, '_shipping_postcode', true );\n\t\t}\n\n\t\t$formatted['formatted_tracking_provider'] = '';\n\t\t$formatted['formatted_tracking_link'] = '';\n\n\t\tif ( $tracking_item['custom_tracking_provider'] ) {\n\t\t\t$formatted['formatted_tracking_provider'] = $tracking_item['custom_tracking_provider'];\n\t\t\t$formatted['formatted_tracking_link'] = $tracking_item['custom_tracking_link'];\n\t\t} else {\n\n\t\t\t$link_format = '';\n\n\t\t\tforeach ( $this->get_providers() as $providers ) {\n\t\t\t\tforeach ( $providers as $provider => $format ) {\n\t\t\t\t\tif ( sanitize_title( $provider ) === $tracking_item['tracking_provider'] ) {\n\t\t\t\t\t\t$link_format = $format;\n\t\t\t\t\t\t$formatted['formatted_tracking_provider'] = $provider;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( $link_format ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $link_format ) {\n\t\t\t\t$formatted['formatted_tracking_link'] = sprintf( $link_format, $tracking_item['tracking_number'], urlencode( $postcode ) );\n\t\t\t}\n\t\t}\n\n\t\treturn $formatted;\n\t}", "public function getRawStats()\n\t{\n\t\t$this->team = factory(Team::class)->create();\n\t\t$this->event = factory(Event::class)->create(['owner_id' => $this->team->id]);\n\t\tfactory(TeamMember::class, 2)->create(['team_id' => $this->team->id, 'user_id' => 0]);\n\n\t\t$this->data = [\n\t\t\t'event'\t=> $this->event,\n\t\t\t'meta'\t=> ['test' => 123],\n\t\t\t'stats'\t=> [\n\t\t\t\t['id' => 0, 'member_id' => 1, 'gs' => true, 'pts' => 12, 'ast' => 6, 'reb' => 8],\n\t\t\t\t['id' => 0, 'member_id' => 2, 'gs' => false, 'pts' => 42, 'ast' => 2, 'reb' => 3],\n\t\t\t],\n\t\t];\n\t}", "public function format() {\r\n\t\t$this->resource->format();\r\n\t}", "public function format(array $record);", "public function format_for_header()\n {\n }", "public function formatDataProvider(): array\n {\n return [\n [new PhoneNumber('8015551212'), '(%a) %e-%n', '', '(801) 555-1212'],\n [new PhoneNumber('8015551212 x55'), '(%a) %e-%n %x', 'ext. ', '(801) 555-1212 ext. 55'],\n [new PhoneNumber('8015551212'), '(%a) %e-%n %x', 'x', '(801) 555-1212'],\n ];\n }", "public function dataProviderFormat()\n {\n return [\n [RefData::EBSR_STATUS_PROCESSING, 'orange', 'processing'],\n [RefData::EBSR_STATUS_VALIDATING, 'orange', 'processing'],\n [RefData::EBSR_STATUS_SUBMITTED, 'orange', 'processing'],\n [RefData::EBSR_STATUS_PROCESSED, 'green', 'successful'],\n [RefData::EBSR_STATUS_FAILED, 'red', 'failed'],\n ];\n }" ]
[ "0.62123954", "0.60214823", "0.5959424", "0.5959424", "0.57091194", "0.5628866", "0.55798537", "0.555564", "0.5537534", "0.5520703", "0.5515618", "0.54503894", "0.54503894", "0.54205036", "0.5397852", "0.533216", "0.53151554", "0.52789956", "0.5245866", "0.5159401", "0.5155281", "0.514588", "0.51294774", "0.5128517", "0.5124215", "0.5106005", "0.50867236", "0.5084231", "0.5084112", "0.50360006" ]
0.7600277
0
Get the [op_prime_id] column value.
public function getOpPrimeId() { return $this->op_prime_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "public function getPrimaryKey()\n {\n return $this->getOpPrimeId();\n }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "public function getOpId()\n {\n\n return $this->op_id;\n }", "public function getOpPrimeLibelle()\n {\n\n return $this->op_prime_libelle;\n }", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "public function getPkValue(){\n $pk = static::getPk();\n return (int) $this->$pk;\n }", "public function let_id_pg(){\n\t\t\treturn (int)$this->ipg_id;\n\t\t}", "public function getOperationPrimeRRewardExpeditionModeId()\n {\n\n return $this->operation_prime_r_reward_expedition_mode_id;\n }", "public function getId() : int\n {\n return $this->getValue('nb_icontact_prospect_id');\n }", "public function getPrimaryKey()\n {\n return $this->getProdId();\n }", "public function getOperationId()\n {\n return $this->operation_id;\n }", "public function getId() {\r\n\t\t\treturn $this->columns[ $this->index ];\r\n\t\t}", "public function get_id()\n {\n $pkey = static::tinydb_get_table_info()->primary_key;\n if (is_array($pkey)) {\n $val = array();\n foreach ($pkey as $field) {\n $val[$field] = \\TinyDb\\Internal\\SqlDataAdapters::decode(static::tinydb_get_table_info()->field_info($field)->type,\n $this->tinydb_rowdata[$field]);\n }\n } else {\n $val = \\TinyDb\\Internal\\SqlDataAdapters::decode(static::tinydb_get_table_info()->field_info($pkey)->type,\n $this->tinydb_rowdata[$pkey]);\n }\n\n\n return $val;\n }", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getCoNumInventario();\n\t}", "public function getID() {\n return array_key_exists($this->_key_field, $this->_data) ? $this->_data[$this->_key_field] : null;\n }", "public function getModuloId() {\n return $this->modulo_id;\n }", "public function getPId();", "public function getPcIdPl() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(1, $this->_result)) return (int) $this->_result[1];\n\t\t\telse parent::throwGetColException('Not set ProjectsListingsModel::getPcIdPl', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From ProjectsListingsModel::getPcIdPl', __LINE__, __FILE__);\n\t}", "public function getColumnId(): string\n {\n return $this->getColumn('id', 'id');\n }", "public function getOID()\n {\n return $this->oID;\n }", "protected function getCurrentId()\n {\n return (array_key_exists($this->idfieldName(), $this->data)) ? $this->data[$this->idfieldName()] : NULL;\n }", "public function setOpId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_id !== $v) {\n $this->op_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_ID;\n }\n\n if ($this->aOperations !== null && $this->aOperations->getOpId() !== $v) {\n $this->aOperations = null;\n }\n\n\n return $this;\n }", "public function getPrimaryKey()\n {\n $cols = $this->info('cols');\n return $cols[0];\n }", "public function id()\n {\n return $this->read($this->metadata['pk']->name);\n }", "public function getIdentityField()\n {\n return $this->gateway->getPrimaryCol();\n }", "public function obtenerIDPrimerPagoElectronico(){\n $criteria = new CDbCriteria;\n $criteria->condition = 'id_pedido = '.$this->id_pedido;\n $registrosCarro = PagosElectronicos::model()->findAll($criteria);\n\n if (sizeof($registrosCarro) > 0)\n return $registrosCarro[0]->id;\n return 0;\n }", "protected function _getId()\r\n\t{\r\n\t\t$select\t\t= $this->_db->select()->from('Cron_Jobs', array('id'))->where('name = ?', $this->_name);\r\n\t\tlist($id)\t= $this->_db->fetchCol($select);\r\n\t\t\r\n\t\treturn $id;\r\n\t}" ]
[ "0.72192276", "0.69231695", "0.6648075", "0.6617529", "0.62691385", "0.5923606", "0.5923606", "0.5825936", "0.5816718", "0.5714843", "0.57011503", "0.5628362", "0.5580933", "0.55354625", "0.5518492", "0.55079764", "0.54923713", "0.5469512", "0.54591674", "0.54401", "0.54069936", "0.5394941", "0.5371505", "0.5365645", "0.536431", "0.5363704", "0.5340984", "0.5326854", "0.531649", "0.53157884" ]
0.82185084
0
Get the [op_id] column value.
public function getOpId() { return $this->op_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationId()\n {\n return $this->operation_id;\n }", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getId() {\r\n\t\t\treturn $this->columns[ $this->index ];\r\n\t\t}", "public function getColumnId(): string\n {\n return $this->getColumn('id', 'id');\n }", "public function getOperationId(): ?string;", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function getID() {\n return array_key_exists($this->_key_field, $this->_data) ? $this->_data[$this->_key_field] : null;\n }", "public function getOID()\n {\n return $this->oID;\n }", "public function getOp()\n {\n return $this->Op;\n }", "public function getOp()\n {\n return $this->Op;\n }", "public function getId()\n {\n return $this->getData(self::INSTRUCTION_ID);\n }", "public function getCmdId()\n {\n return $this->get(self::CMD_ID);\n }", "public function id()\n {\n return $this->read($this->metadata['pk']->name);\n }", "public function getIdColumn()\n {\n return $this->idColumn;\n }", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "public function getId()\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "public function getPrimaryKey()\n {\n return $this->getOpPrimeId();\n }", "public function getId() : string\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "function get_id() {\n return $this->get_mapped_property('id');\n }", "public function getId()\n {\n $value = $this->get(self::ID);\n return $value === null ? (string)$value : $value;\n }", "protected function getCurrentId()\n {\n return (array_key_exists($this->idfieldName(), $this->data)) ? $this->data[$this->idfieldName()] : NULL;\n }", "public function getIdentityField()\n {\n return $this->gateway->getPrimaryCol();\n }", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "public function getId()\n {\n return $this->getValue('id');\n }", "public function id()\n\t{\n\t\treturn $this->get($this->meta()->primary_key);\n\t}", "public function get_column_id()\n\t{\n\t\treturn $this->table.'.id';\n\t}", "public function getValueId()\n {\n return $this->valueId;\n }", "public function getID() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->orderId;\r\n\t}" ]
[ "0.6854243", "0.64414126", "0.64414126", "0.63226193", "0.62305635", "0.60161823", "0.5986363", "0.59794766", "0.597422", "0.59416896", "0.59416896", "0.59350705", "0.5930112", "0.5891276", "0.5881656", "0.58718306", "0.58709615", "0.58382976", "0.58303183", "0.58217275", "0.5810168", "0.5802652", "0.5791738", "0.57773507", "0.57773507", "0.5764119", "0.5756042", "0.5739959", "0.5729678", "0.5726569" ]
0.80394846
0
Get the [op_prime_libelle] column value.
public function getOpPrimeLibelle() { return $this->op_prime_libelle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLibelle()\n {\n return $this->libelle;\n }", "public function getLibelle()\n {\n return $this->libelle;\n }", "public function getLibelle()\n {\n return $this->libelle;\n }", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "public function getLibelleEcr() {\n return $this->libelleEcr;\n }", "function getLibelOperation($type_op) { //Renvoie le libellé dun operation\n\tglobal $dbHandler,$global_id_agence;\n\t$db = $dbHandler->openConnection();\n\t\n\t$sql=\"SELECT traduction from ad_cpt_ope a, ad_traductions b where a.libel_ope = b.id_str and categorie_ope in (2,3) and type_operation = $type_op ;\";\n\t\n\t$result = $db->query($sql);\n\tif (DB :: isError($result)) {\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n\t}\n\t$dbHandler->closeConnection(true);\n\t$retour = $result->fetchrow();\n\treturn $retour[0];\n}", "public function setOpPrimeLibelle($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->op_prime_libelle !== $v) {\n $this->op_prime_libelle = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE;\n }\n\n\n return $this;\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function getCodeLibelle(): ?string {\n return $this->codeLibelle;\n }", "public function getLibelleSeance(): ?string {\n return $this->libelleSeance;\n }", "public function getLibelle();", "public function getOPFind($co_pcp_apontamento){\r\n\t\t$query = \"SELECT CONCAT(ORDEM_PRODUCAO.CO_NUM,ORDEM_PRODUCAO.CO_ITEM,ORDEM_PRODUCAO.CO_SEQUENCIA) NU_OP \r\n\t\t\t\t\tFROM TB_PCP_APONTAMENTO APONTAMENTO \r\n\t\t\t\t\tINNER JOIN TB_PCP_OP ORDEM_PRODUCAO \r\n\t\t\t\t\t\tON APONTAMENTO.CO_PCP_OP = ORDEM_PRODUCAO.CO_PCP_OP WHERE CO_PCP_APONTAMENTO = \".$co_pcp_apontamento;\r\n\t\t$result = mysql_query($query, $this->conexaoERP);\r\n\t\t$row = mysql_fetch_array($result);\r\n\t\treturn $row;\r\n\t\t\r\n\t}", "public function getComunaOrigen()\n {\n return $this->comunaOrigen;\n }", "function getLibelOperationTransaction($type_op) { //Renvoie le libellé dun operation\n global $dbHandler,$global_id_agence;\n $db = $dbHandler->openConnection();\n\n $sql=\"SELECT traduction from ad_cpt_ope a, ad_traductions b where a.libel_ope = b.id_str and type_operation = $type_op ;\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n $dbHandler->closeConnection(true);\n $retour = $result->fetchrow();\n return $retour[0];\n}", "function getLibellEcriture($id_libel_ecriture) { //Renvoie le libellé dun ecriture/op divers\n\tglobal $dbHandler,$global_id_agence;\n\t$db = $dbHandler->openConnection();\n\n\t$sql=\"SELECT traduction from ad_traductions where id_str = $id_libel_ecriture ;\";\n\t\n\t$result = $db->query($sql);\n\tif (DB :: isError($result)) {\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n\t}\n\t$dbHandler->closeConnection(true);\n\t$retour = $result->fetchrow();\n\treturn $retour[0];\n}", "public function getLibelleMotCle()\n {\n return $this->libelleMotCle;\n }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "protected function getCodeModeDePaiement()\r\n {\r\n $table = $this->getDbManager()->get('Sbm\\Db\\System\\Libelles');\r\n return $table->getCode('ModeDePaiement', 'CB');\r\n }", "public function getProduct_code () {\n\t$preValue = $this->preGetValue(\"product_code\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_code;\n\treturn $data;\n}", "function getCarteOperation()\n {\n $query_rq_service = \"SELECT numero_carte FROM carte_parametrable WHERE idcarte=2\";\n $service = $this->getConnexion()->prepare($query_rq_service);\n $service->execute();\n $row_rq_service= $service->fetchObject();\n return $row_rq_service->numero_carte;\n }", "public function getLibelleMatiere()\n {\n return $this->libelleMatiere;\n }", "function OBTENER_FORMULA($_ARGS) {\r\n\t$sql = \"SELECT Formula FROM pr_concepto WHERE CodConcepto = '\".$_ARGS['CONCEPTO'].\"'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) {\r\n\t\t$field = mysql_fetch_array($query);\r\n\t\treturn $field['Formula'];\r\n\t} else return \"\";\r\n}", "public function getIdOrdenCompra() {\n return $this->id_orden_compra;\n }", "public function getDocumentProductCod()\n {\n return (string) $this->document_product_cod;\n }", "public function getCodeStatutPro() {\n return $this->codeStatutPro;\n }", "public function getValorParcela()\n {\n return $this->valorParcela;\n }", "function get_nbre_conso(){\n\t\tglobal $bd;\n\t\t$req = $bd->query(\"SELECT SUM(nbre) as nbre FROM consommateur WHERE etat = 'present' \");\n\t\t$data = $req->fetch();\n\t\treturn $data['nbre'];\n\t}", "public function get_Code_produit()\n\t\t{\n\t\t\treturn $this->Code_produit;\n\t\t}", "public function getCodeProduit() {\n return $this->codeProduit;\n }", "public function getCodProducto()\n {\n return $this->codProducto;\n }" ]
[ "0.64187676", "0.64187676", "0.64187676", "0.6328785", "0.6213114", "0.62074524", "0.5890744", "0.57305837", "0.5648851", "0.54826444", "0.54175", "0.5410004", "0.5381991", "0.5363936", "0.5327431", "0.53254193", "0.53252274", "0.5240946", "0.5192604", "0.51889575", "0.5182472", "0.51462805", "0.51121944", "0.5087643", "0.50789577", "0.505431", "0.50425", "0.50368196", "0.50203", "0.49871752" ]
0.7962335
0
Get the [op_prime_numero] column value.
public function getOpPrimeNumero() { return $this->op_prime_numero; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function getOpPrimeLibelle()\n {\n\n return $this->op_prime_libelle;\n }", "public function getNumeroProcesso() {\n return $this->iNumeroProcesso;\n }", "public function getNumero() {\n return $this->numero;\n }", "function getNumero() {\n return $this->numero;\n }", "public function getNUMEROINT()\r\n {\r\n return $this->NUMERO_INT;\r\n }", "public function getNumero()\n {\n return $this->numero;\n }", "public function getNUMERO_INT()\r\n {\r\n return $this->NUMERO_INT;\r\n }", "function getCarteOperation()\n {\n $query_rq_service = \"SELECT numero_carte FROM carte_parametrable WHERE idcarte=2\";\n $service = $this->getConnexion()->prepare($query_rq_service);\n $service->execute();\n $row_rq_service= $service->fetchObject();\n return $row_rq_service->numero_carte;\n }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "function getNota_num()\n {\n if (!isset($this->inota_num) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_num;\n }", "function getNota_num()\n {\n if (!isset($this->inota_num) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_num;\n }", "public function setOpPrimeNumero($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_numero !== $v) {\n $this->op_prime_numero = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_NUMERO;\n }\n\n\n return $this;\n }", "function numero()\r\n {\r\n \r\n $numrec = $this->db->query(\"SELECT * FROM parametros\")->result_array();\r\n return $numrec;\r\n }", "public function getNumero() {\n return $this->sNumero;\n }", "function get_nbre_conso(){\n\t\tglobal $bd;\n\t\t$req = $bd->query(\"SELECT SUM(nbre) as nbre FROM consommateur WHERE etat = 'present' \");\n\t\t$data = $req->fetch();\n\t\treturn $data['nbre'];\n\t}", "function getCarteCommisssion()\n {\n $query_rq_service = \"SELECT numero_carte FROM carte_parametrable WHERE idcarte=1\";\n $service = $this->getConnexion()->prepare($query_rq_service);\n $service->execute();\n $row_rq_service= $service->fetchObject();\n return $row_rq_service->numero_carte;\n }", "public function getNumerocarte()\n {\n return $this->numerocarte;\n }", "public function getNumero_cb()\n {\n return $this->numero_cb;\n }", "public function getNombPropietario(){\n $app = App::getSingleton();\n $conn = $app->conexionBd();\n $IDpropietario = self::getPropietario();\n $query = sprintf(\"SELECT nombre FROM usuarios WHERE id = %s\",$conn->real_escape_string($IDpropietario));\n $consulta = $conn->query($query);\n if($consulta->num_rows > 0){\n $fila = $consulta->fetch_assoc();\n $nombPropietario = $fila['nombre'];\n }else{\n $nombPropietario = \"Anonimo\";\n }\n return $nombPropietario;\n }", "public function getOperationPrimeMaximumAmount()\n {\n\n return $this->operation_prime_maximum_amount;\n }", "public function CodigoProduccion()\r\n\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli=$objetoBD->cadenaConexion();\r\n\r\n $consulta=\"SELECT max(prod_id) as maximo FROM produccion \";\r\n $resultado=$mysqli->query($consulta);\r\n\r\n $maximo=\"\";\r\n while($fila=mysqli_fetch_object($resultado)){\r\n\r\n $maximo=$fila->maximo;\r\n\r\n\r\n }\r\n return $maximo+1;\r\n\r\n }", "public function getNumeroCivico() {\n return $this->numeroCivico;\n }", "public function getNossoNumero();", "public static function totinprimopiano(){\r\n $query = \"SELECT count(idev) FROM primopiano\";\r\n\t\t$result = self::$conn->query($query);\r\n $id =array();\r\n if($result){\r\n $row = $result->fetch_array(MYSQLI_NUM);\r\n return (int)$row[0];\r\n }\r\n return 0;\r\n }", "public function getNumeroLabel() {\n return $this->numeroLabel;\n }", "public static function Numero_Orden()\n {\n // Consulta de la meta\n $consulta = \"SELECT num_orden FROM ordenes ORDER BY id_orden DESC LIMIT 1\";\n\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute(); \n // Capturar primera fila del resultado\n $row = $comando->fetch(PDO::FETCH_ASSOC);\n return $row; \n\n } catch (PDOException $e) {\n // Aquí puedes clasificar el error dependiendo de la excepción\n // para presentarlo en la respuesta Json\n return -1;\n }\n }", "public function obtenerIDPrimerPagoElectronico(){\n $criteria = new CDbCriteria;\n $criteria->condition = 'id_pedido = '.$this->id_pedido;\n $registrosCarro = PagosElectronicos::model()->findAll($criteria);\n\n if (sizeof($registrosCarro) > 0)\n return $registrosCarro[0]->id;\n return 0;\n }", "public function getValorParcela()\n {\n return $this->valorParcela;\n }", "public function getNum()\n {\n return $this->get(self::_NUM);\n }" ]
[ "0.69652295", "0.6779649", "0.6195364", "0.61157924", "0.6081711", "0.6076515", "0.60570854", "0.5930269", "0.592364", "0.58985156", "0.585972", "0.585972", "0.58493847", "0.5824136", "0.5770044", "0.56389725", "0.56212413", "0.5605843", "0.558562", "0.55486846", "0.54947644", "0.54945374", "0.54942924", "0.5481317", "0.54718506", "0.54699904", "0.5463798", "0.5459899", "0.5446513", "0.54132426" ]
0.8128191
0
Get the [gdl_art_id] column value.
public function getGdlArtId() { return $this->gdl_art_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdArt()\n {\n return $this->idArt;\n }", "public function getidArt()\n\t {\n\t return $this->idArt;\n\t }", "public function getidArt()\n\t {\n\t return $this->idArt;\n\t }", "public function getidArt()\n\t {\n\t return $this->idArt;\n\t }", "public function setGdlArtId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->gdl_art_id !== $v) {\n $this->gdl_art_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::GDL_ART_ID;\n }\n\n\n return $this;\n }", "public function getID() {\n return array_key_exists($this->_key_field, $this->_data) ? $this->_data[$this->_key_field] : null;\n }", "public function get_id()\n {\n $pkey = static::tinydb_get_table_info()->primary_key;\n if (is_array($pkey)) {\n $val = array();\n foreach ($pkey as $field) {\n $val[$field] = \\TinyDb\\Internal\\SqlDataAdapters::decode(static::tinydb_get_table_info()->field_info($field)->type,\n $this->tinydb_rowdata[$field]);\n }\n } else {\n $val = \\TinyDb\\Internal\\SqlDataAdapters::decode(static::tinydb_get_table_info()->field_info($pkey)->type,\n $this->tinydb_rowdata[$pkey]);\n }\n\n\n return $val;\n }", "function getID() {\n\t\treturn $this->data_array['artifact_id'];\n\t}", "public function getRowId()\n\t{\n\t\treturn 'entity_id';\n\t}", "protected function get__id()\n\t{\n\t\t$idColumn = static::$databaseColumnId;\n\t\treturn $this->$idColumn;\n\t}", "public function getId() {\r\n\t\t\treturn $this->columns[ $this->index ];\r\n\t\t}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function id()\n {\n return $this->read($this->metadata['pk']->name);\n }", "public function getId() : string\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "private function getProductIdentifierField()\n {\n if (!$this->productEntityIdentifierField) {\n $this->productEntityIdentifierField = $this->getMetadataPool()\n ->getMetadata(\\Magento\\Catalog\\Api\\Data\\ProductInterface::class)\n ->getIdentifierField();\n }\n return $this->productEntityIdentifierField;\n }", "public function getId()\n {\n return $this->product->{$this->params['productFieldId']};\n }", "public function getID()\n {\n return $this->formattedData['id'];\n }", "public function getId()\n {\n // TODO: Implement getId() method.\n return $this->ad_id;\n }", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "function get_id() {\n return $this->get_mapped_property('id');\n }", "public function getId()\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "public function getId(): int\n {\n $idSplit = explode('.', $this->data['externalidField']);\n return $idSplit[1] ?? $this->data['externalidField'];\n }", "function getID() {\n\t\treturn $this->data_array['id'];\n\t}", "public function getId()\n {\n return $this->product->{$this->params['productFieldId']};\n }", "public function id()\n\t{\n\t\treturn $this->get($this->meta()->primary_key);\n\t}", "public function getIDField(): string {\n\t\treturn $this->idField;\n\t}", "public function getId()\n {\n return $this->elasticaResult->getId();\n }", "public function grn_id(){\n return parent::get_fk_object(\"grn_id\");\n }", "public function idPenjualan()\n {\n $get_id = $this->penjualan->get_idmax();\n\n return $get_id; //TRX00001\n }" ]
[ "0.65305364", "0.642353", "0.642353", "0.642353", "0.621799", "0.6118175", "0.61141753", "0.6101657", "0.6011724", "0.5935601", "0.5928047", "0.5911564", "0.5911564", "0.5823948", "0.58236337", "0.5812425", "0.5804981", "0.580294", "0.57908815", "0.57905495", "0.57878834", "0.5781539", "0.5772197", "0.57431436", "0.57422376", "0.5701066", "0.5698901", "0.56959766", "0.5695572", "0.56860644" ]
0.78920126
0
Get the [operation_prime_currency_id] column value.
public function getOperationPrimeCurrencyId() { return $this->operation_prime_currency_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function getId() {\r\n\t\treturn($this->_currency_id);\r\n\t}", "public function getCurrencyId()\n {\n return $this->currency_id;\n }", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "public function getCurrencyID()\n {\n return $this->currencyID;\n }", "public function getPrimaryKey()\n {\n return $this->getOpPrimeId();\n }", "public function getCoinId()\n {\n $this->checkIfKeyExistsAndIsInteger('coin_id');\n\n return $this->data['coin_id'];\n }", "public function getOperationId()\n {\n return $this->operation_id;\n }", "public function getCompanyId()\n\t{\n\t\t$column = self::COL_COMPANY_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getOpPrimeLibelle()\n {\n\n return $this->op_prime_libelle;\n }", "public function getCurrencyCode()\n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function currencyCode()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencyCode();\n }", "public function getCurrencyCode() \n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "public function getComId() {\n return $this->comId;\n }", "public function getCurrentCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyCode();\r\n\t}", "public function getCommodityCode()\n {\n return $this->commodityCode;\n }", "function getIdEquipe() {\r\n return $this->IdEquipe;\r\n }", "public function getCurrencyCode(){\n if(!$this->currencyCode){\n return $this->currencyCode = Shop_CurrencySettings::get()->code;\n }\n return $this->currencyCode;\n }", "private function obtenerNuevoID()\n\t{\n\t\t$query = $this->db->select('MAX(CPRODUCTOFS) as id')\n\t\t\t->from('MPRODUCTOCLIENTE')\n\t\t\t->get();\n\t\tif (!$query) {\n\t\t\tthrow new Exception('Error al encontrar el Código de producto');\n\t\t}\n\t\treturn intval($query->row()->id) + 1;\n\t}", "public function getIdCompra()\r\n {\r\n return $this->idCompra;\r\n }", "public function getOperationPrimeFixedAmount()\n {\n\n return $this->operation_prime_fixed_amount;\n }", "public function getProdPriceId()\n {\n return $this->prod_price_id;\n }", "public function getOperationPrimeRRewardExpeditionModeId()\n {\n\n return $this->operation_prime_r_reward_expedition_mode_id;\n }", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getCoNumInventario();\n\t}", "function getCarteOperation()\n {\n $query_rq_service = \"SELECT numero_carte FROM carte_parametrable WHERE idcarte=2\";\n $service = $this->getConnexion()->prepare($query_rq_service);\n $service->execute();\n $row_rq_service= $service->fetchObject();\n return $row_rq_service->numero_carte;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }" ]
[ "0.67050874", "0.65308934", "0.6258168", "0.6064645", "0.6054431", "0.5844944", "0.5679418", "0.5539268", "0.5504156", "0.5503011", "0.5502969", "0.54434776", "0.54260874", "0.53574157", "0.5279207", "0.5279207", "0.52437246", "0.5204225", "0.5194511", "0.5179614", "0.5169454", "0.5162627", "0.5161225", "0.5157038", "0.5153575", "0.51485455", "0.5143956", "0.5130059", "0.5119001", "0.5113814" ]
0.8447531
0
Get the [operation_prime_r_reward_type_id] column value.
public function getOperationPrimeRRewardTypeId() { return $this->operation_prime_r_reward_type_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getType_id()\n {\n return $this->type_id;\n }", "public function getOperationPrimeRRewardExpeditionModeId()\n {\n\n return $this->operation_prime_r_reward_expedition_mode_id;\n }", "public function getIdType() {\n\t\treturn $this->id_type;\n\t}", "public function get_type()\n {\n return self::$_id;\n }", "public function getOperationPrimeRRewardTransporterId()\n {\n\n return $this->operation_prime_r_reward_transporter_id;\n }", "public function setOperationPrimeRRewardTypeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_type_id !== $v) {\n $this->operation_prime_r_reward_type_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID;\n }\n\n if ($this->aRRewardTypes !== null && $this->aRRewardTypes->getRRewardTypeId() !== $v) {\n $this->aRRewardTypes = null;\n }\n\n\n return $this;\n }", "public function getRelationTypeId()\n {\n return $this->relation_type_id;\n }", "public function getTypeID() {\n\t\treturn $this->_type_id;\n\t}", "public function getIdType()\n {\n return $this->idType;\n }", "public function getType()\n {\n $value = $this->get(self::TYPE);\n return $value === null ? (integer)$value : $value;\n }", "public function getTypeId()\n {\n return $this->type_id;\n }", "public function getTypeId()\n {\n return $this->type_id;\n }", "public function getTypeId()\n {\n return $this->type_id;\n }", "public function getTypeId()\n {\n return $this->_getData('type_id');\n }", "public function getType()\n {\n return $this->type()->getID();\n }", "public function getTypeCode () {\n if (2 == $this->status) {\n return \"meanless\";\n }\n\n return $this->objtype;\n }", "public function getRewardId()\n {\n return $this->reward_id;\n }", "public function getTypeId()\n {\n return $this->get(self::_TYPE_ID);\n }", "public function getTypeCode(): int\n {\n return $this->typeCode;\n }", "public function type(): int\n {\n return $this->type;\n }", "public function getTypeId()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'typeid'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'typeid'];\n\t\t}\n\t}", "Public function get_ididtypeexp()\n\t\t{\n\t\t\tReturn $this ->idtypeexp;\n\t\t}", "public function type(): int\n {\n return (int) $this->type;\n }", "public function getTypeFacture_id()\n {\n return $this->typeFacture_id;\n }", "function getType(){\r\n\t\tif($this->inDB==false||$this->type==null){\r\n\t\t\t$temp=$this->dbq->getAnswerType($this->answer_id);\r\n\t\t\t$this->type = $temp;\r\n\t\t}\r\n\t\treturn $this->type;\r\n\t}", "public function getRealestateType()\n {\n return $this->hasOne(RealEstateType::className(), ['id' => 'realestate_type_id']);\n }", "public function getItineraryTypeId()\n {\n return $this->itinerary_type_id;\n }", "public function getType(): int\n {\n return $this->type;\n }", "public function getType()\n {\n return isset($this->type) ? $this->type : 0;\n }", "public function getTypeForID() {\n\t\treturn self::C_DATATYPE_INTEGER;\n\t}" ]
[ "0.6128773", "0.5971852", "0.5958365", "0.5925417", "0.5923487", "0.5910461", "0.5900198", "0.58992726", "0.57221735", "0.57031703", "0.56892955", "0.56892955", "0.56892955", "0.5680827", "0.5666618", "0.56575644", "0.56103384", "0.56047326", "0.56027794", "0.56008273", "0.5596561", "0.5586816", "0.557922", "0.5545386", "0.5522816", "0.5513707", "0.5491557", "0.549104", "0.5487833", "0.54741824" ]
0.8441382
0
Get the [operation_prime_r_reward_expedition_mode_id] column value.
public function getOperationPrimeRRewardExpeditionModeId() { return $this->operation_prime_r_reward_expedition_mode_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOperationPrimeRRewardExpeditionModeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_expedition_mode_id !== $v) {\n $this->operation_prime_r_reward_expedition_mode_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID;\n }\n\n if ($this->aRRewardExpeditionModes !== null && $this->aRRewardExpeditionModes->getRRewardExpeditionModeId() !== $v) {\n $this->aRRewardExpeditionModes = null;\n }\n\n\n return $this;\n }", "function getModeID($mode)\n\t{\n\t\t$returnValue\t\t= -1;\n\t\t\n\t\tif (strcasecmp($mode, \"development\") == 0)\n\t\t{\n\t\t\t$returnValue\t= 1;\t\t\n\t\t}\n\t\telse if (strcasecmp($mode, \"production\") == 0)\n\t\t{\n\t\t\t$returnValue\t= 2;\t\t\n\t\t}\n\t\t\n\t\treturn $returnValue;\n\t}", "public function getOperationPrimeRRewardTypeId()\n {\n\n return $this->operation_prime_r_reward_type_id;\n }", "public function getEditionId()\n {\n return $this->edition_id;\n }", "public function getModeReglement() {\n return $this->modeReglement;\n }", "public function getEdition(): int\n {\n /** @var WebApplication|ConsoleApplication $this */\n $handle = $this->getProjectConfig()->get('system.edition') ?? 'solo';\n return App::editionIdByHandle($handle);\n }", "protected function getCodeModeDePaiement()\r\n {\r\n $table = $this->getDbManager()->get('Sbm\\Db\\System\\Libelles');\r\n return $table->getCode('ModeDePaiement', 'CB');\r\n }", "public function getMode()\n {\n return $this->hasOne(MsMode::className(), ['id' => 'mode_id']);\n }", "public function getOperationPrimeRRewardTransporterId()\n {\n\n return $this->operation_prime_r_reward_transporter_id;\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function getMode(): string\n {\n return $this->mode;\n }", "function _exp_mode($mode=NULL){\n $mode = 'exp_' . nz($mode,$this->exp_mode_default);\n return method_exists($this,$mode)?$mode:FALSE;\n }", "protected function getMode() {\n\t\treturn $this->mode;\n\t}", "final public function mode():string\n {\n return $this->mode;\n }", "public function getEdition()\n {\n $edition = self::COMMUNITY_EDITION;\n\n if (method_exists('Mage', 'getEdition')) {\n $edition = Mage::getEdition();\n } else {\n $dir = Mage::getBaseDir('code') . DS . 'core' . DS . self::ENTERPRISE_EDITION;\n if (file_exists($dir)) {\n $edition = self::ENTERPRISE_EDITION;\n }\n }\n\n return $edition;\n }", "public function mode()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" mode ?\");\n\t}", "function getid_exp()\n { return $this->id_exp;}", "final public function getMode(): int {}", "public function GetMode()\n\t{\n\t\treturn $this->mode;\n\t}", "public function getMode() {\n return $this->mode;\n }", "public function getMode() {\n return $this->mode;\n }", "public function getOpId()\n {\n\n return $this->op_id;\n }", "public function getMode()\n {\n return $this->_mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }" ]
[ "0.642256", "0.626327", "0.6258651", "0.6167572", "0.5966962", "0.58576626", "0.56559217", "0.5654066", "0.56506354", "0.5639693", "0.5526582", "0.5503014", "0.5487547", "0.5472692", "0.5467565", "0.5455491", "0.54516625", "0.54383254", "0.5418965", "0.5400028", "0.5400028", "0.53992337", "0.5396964", "0.5395899", "0.5395899", "0.5395899", "0.5395899", "0.5395899", "0.5395899", "0.5395899" ]
0.8657667
0
Get the [operation_prime_r_reward_transporter_id] column value.
public function getOperationPrimeRRewardTransporterId() { return $this->operation_prime_r_reward_transporter_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRelaterId()\n {\n $value = $this->get(self::RELATER_ID);\n return $value === null ? (integer)$value : $value;\n }", "private function getRetailerId()\n {\n $retailerId = null;\n if ($this->currentStore->getRetailer() && $this->currentStore->getRetailer()->getId()) {\n $retailerId = (int) $this->currentStore->getRetailer()->getId();\n }\n\n return $retailerId;\n }", "public function setOperationPrimeRRewardTransporterId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_transporter_id !== $v) {\n $this->operation_prime_r_reward_transporter_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID;\n }\n\n if ($this->aRRewardTransporters !== null && $this->aRRewardTransporters->getRRewardTransporterId() !== $v) {\n $this->aRRewardTransporters = null;\n }\n\n\n return $this;\n }", "public function getPayerId() {\n\t\treturn $this->_getField(self::$PAYER_ID);\n\t}", "public function getOperationPrimeRRewardTypeId()\n {\n\n return $this->operation_prime_r_reward_type_id;\n }", "public function getRequestorID()\n {\n return $this->requestorID;\n }", "public function getAgentId() {\n if (isset($this->rJoinAgent) && count($this->rJoinAgent) > 0) {\n if (isset($this->rJoinAgent[0]->rAgent)) {\n return $this->rJoinAgent[0]->rAgent->id;\n }\n }\n return '';\n }", "public function getRecommenderId()\n {\n return $this->recommender_id;\n }", "function getReviewerId() {\n\t\treturn $this->getData('reviewerId');\n\t}", "public function getOperationPrimeRRewardExpeditionModeId()\n {\n\n return $this->operation_prime_r_reward_expedition_mode_id;\n }", "public function getPayerId(): ?string\n {\n return $this->{self::PAYER_ID};\n }", "public function getDonorId() {\n\t\treturn $this->donor_id;\n\t}", "public function getReceiverId();", "public function getBidderTeamId()\n {\n if ($this->isTransferListed() && $this->getHighestBid() > 0) {\n $xpath = new \\DOMXPath($this->getXml());\n return $xpath->query('//BidderTeam/TeamID')->item(0)->nodeValue;\n }\n return null;\n }", "function getERCId() {\n\t\treturn $this->getData('ercId');\n\t}", "function get_recipient_id() {\n\t\treturn $this->get_data( 'recipient' );\n\t}", "public function getWholesalerId()\n {\n $value = $this->get(self::wholesaler_id);\n return $value === null ? (integer)$value : $value;\n }", "public function getId_recette()\n {\n return $this->_id_recette;\n }", "public function getUpdaterId()\n {\n return $this->updater_id;\n }", "public function getUpdaterId()\n {\n return $this->updater_id;\n }", "public function getUpdaterId()\n {\n return $this->updater_id;\n }", "public function getUpdaterId()\n {\n return $this->updater_id;\n }", "public function getIdFormerApprover()\n {\n return $this->idFormerApprover;\n }", "public function getIdFornecedor() {\n return $this->IdFornecedor;\n }", "public function getRewardId()\n {\n return $this->reward_id;\n }", "public function getReverseEngineeringDecryptorID()\n {\n return $this->reverseEngineeringDecryptorID;\n }", "public function getRepairId()\n {\n return $this->repair_id;\n }", "public function getTravelerProfileId()\n\t{\n\t\treturn $this->travelerProfileId;\n\t}", "public function getRpacketTId()\n {\n return $this->rpacket_t_id;\n }", "public function getGamerId()\n {\n $value = $this->get(self::GAMER_ID);\n return $value === null ? (integer)$value : $value;\n }" ]
[ "0.6779566", "0.67292094", "0.6601552", "0.6599131", "0.6279402", "0.6278373", "0.60891867", "0.60190415", "0.5993007", "0.5989244", "0.5960304", "0.5921398", "0.5859235", "0.5796274", "0.57935035", "0.5786525", "0.5776628", "0.5774534", "0.57615083", "0.57615083", "0.57615083", "0.57615083", "0.5743266", "0.5727528", "0.5687168", "0.5682529", "0.5620254", "0.5618162", "0.5592199", "0.5562367" ]
0.8755693
0
Get the [operation_prime_fixed_amount] column value.
public function getOperationPrimeFixedAmount() { return $this->operation_prime_fixed_amount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationPrimeMaximumAmount()\n {\n\n return $this->operation_prime_maximum_amount;\n }", "public function setOperationPrimeFixedAmount($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_string($v)){\n $v = str_replace(\n array(' ',','),\n array('','.'),\n $v\n );\n }\n \n if(is_numeric($v)) {\n $v = (float) $v;\n }\n }\n if ($this->operation_prime_fixed_amount !== $v) {\n $this->operation_prime_fixed_amount = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT;\n }\n\n\n return $this;\n }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "public function getOperationPrimeProductPricePourcentage()\n {\n\n return $this->operation_prime_product_price_pourcentage;\n }", "public function getChargeValueModifier()\n {\n $value = 0;\n\n if ($this->isCompleted() || $this->isPending()) {\n $value += $this->getValue();\n }\n\n if ($this->getBackendTransactions()) {\n foreach ($this->getBackendTransactions() as $transaction) {\n if ($transaction->isRefund() && $transaction->isSucceed()) {\n $value -= abs($transaction->getValue());\n }\n }\n }\n\n return max(0, $value);\n }", "public function getFixedCost()\n {\n return $this->fixed_cost;\n }", "public function getTransactionValue() {\n return $this->mutation_amount * $this->mutation_price;\n }", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "public function getFixedDiscountPrice()\n {\n return $this->fixed_discount_price . ' $';\n }", "public function getDepositPrice()\n {\n $this->checkIfKeyExistsAndIsInteger('price');\n\n return $this->data['price'];\n }", "public function factorial(): BigInteger\n {\n $calculatedValue = gmp_fact($this->getValue());\n\n return $this->assignValue($calculatedValue);\n }", "public function getFixed64Field()\n {\n $value = $this->get(self::FIXED64_FIELD);\n return $value === null ? (integer)$value : $value;\n }", "public function amount(): float\n {\n return $this->amount;\n }", "function getSystemMoneyValue()\n\t\t{\n\t\t\t$system_value = $this->_BLL_obj->manage_content->getLastValue('system_money_info', '*', 1, 1, 'id');\n\t\t\treturn $system_value[0]['system_balance'];\n\t\t}", "public function getAmount()\n {\n return $this->_fields['Amount']['FieldValue'];\n }", "public function getPerPersonEquivFareAmount()\n {\n return $this->PerPersonEquivFareAmount;\n }", "public function getAmount() \n {\n return $this->_fields['Amount']['FieldValue'];\n }", "public function get_concession_amount(){\n $row = 100; //$this->fetch($run);\n return $row;\n }", "public function getSfixed64Field()\n {\n $value = $this->get(self::SFIXED64_FIELD);\n return $value === null ? (integer)$value : $value;\n }", "public function getMontoFinanciamiento()\n {\n $montoFinanciamiento = 0;\n foreach($this->fuentes as $fuente)\n {\n $moneda=$fuente->getMoneda();\n $montoFinanciamiento+=($fuente->getMonto()*$moneda->getPrecioBs());\n }\n return $montoFinanciamiento;\n }", "public function getIteneraryEquivFareAmount()\n {\n return $this->IteneraryEquivFareAmount;\n }", "public function getAmount()\n {\n return $this->MoneyAmount;\n }", "public function getAmount(): float;", "public function getTransactionAmount() \n {\n return $this->_fields['TransactionAmount']['FieldValue'];\n }", "public function getProfitFinalPriceAttribute()\n {\n if ( Configuration::isTrue('ENABLE_ECOTAXES') )\n return $this->unit_final_price - $this->ecotax_amount;\n\n // Otherwise\n return $this->unit_final_price;\n }", "public function getPrice(): int\n {\n return $this->getProduct()->getPriceInfo()->getPrice('final_price')->getValue();\n }", "public function getAmountPlanned()\n {\n return $this->amountPlanned instanceof CentPrecisionMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned;\n }", "public function column_amount( $request ) {\n\t\t$currency = get_post_meta( $request->ID, '_camppayments_currency', true );\n\t\t$amount = get_post_meta( $request->ID, '_camppayments_payment_amount', true );\n\n\t\tif ( strpos( $currency, 'null' ) === false && $amount ) {\n\t\t\treturn sprintf( '%s&nbsp;%s', esc_html( $amount ), esc_html( $currency ) );\n\t\t} elseif ( $amount ) {\n\t\t\treturn esc_html( $amount );\n\t\t}\n\t}", "public function getDealPrice()\n {\n $value = $this->get(self::deal_price);\n return $value === null ? (integer)$value : $value;\n }", "public function getTotalMarketValue()\n {\n return $this->totalMarketValue;\n }" ]
[ "0.6291335", "0.56566775", "0.53594", "0.53132343", "0.52206147", "0.52107495", "0.5126435", "0.5124241", "0.51042885", "0.508893", "0.50851667", "0.50497", "0.48663005", "0.48652673", "0.48305568", "0.48106357", "0.48056546", "0.48026884", "0.47845963", "0.47630927", "0.47477075", "0.4740365", "0.47379816", "0.4729797", "0.4714235", "0.47077885", "0.47049296", "0.47015887", "0.4694054", "0.4691676" ]
0.82540286
0
Get the [operation_prime_product_price_pourcentage] column value.
public function getOperationPrimeProductPricePourcentage() { return $this->operation_prime_product_price_pourcentage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOperationPrimeProductPricePourcentage($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_product_price_pourcentage !== $v) {\n $this->operation_prime_product_price_pourcentage = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE;\n }\n\n\n return $this;\n }", "public function getOperationPrimeFixedAmount()\n {\n\n return $this->operation_prime_fixed_amount;\n }", "public function getPourcentage() : float\n {\n return $this->pourcentage;\n }", "public function getProfitFinalPriceAttribute()\n {\n if ( Configuration::isTrue('ENABLE_ECOTAXES') )\n return $this->unit_final_price - $this->ecotax_amount;\n\n // Otherwise\n return $this->unit_final_price;\n }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "public function getPourcentage()\n {\n return $this->pourcentage;\n }", "public function getOperationPrimeMaximumAmount()\n {\n\n return $this->operation_prime_maximum_amount;\n }", "public function getPrice(): int\n {\n return $this->getProduct()->getPriceInfo()->getPrice('final_price')->getValue();\n }", "public function getProductPrice() {\n //return the value product price\n return $this->ProductPrice;\n }", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "public function getPrice() {\n $price = 420;\n return $price;\n }", "public function getPrice()\n {\n if ($this->_calculatePrice || !$this->getData('price')) {\n return $this->getPriceModel()->getPrice($this);\n } else {\n return $this->getData('price');\n }\n }", "public function get_price() {\n\n\t\t$price = null;\n\t\tif ( $this->is_on_sale() ) {\n\t\t\tif ( strstr($this->sale_price,'%') ) {\n\t\t\t\t$price = round($this->regular_price * ( (100 - str_replace('%','',$this->sale_price) ) / 100 ), 4);\n\t\t\t} else if ( $this->sale_price ) {\n\t\t\t\t$price = $this->sale_price;\n\t\t\t}\n\t\t} else {\n\t\t\t$price = apply_filters('jigoshop_product_get_regular_price', $this->regular_price, $this->variation_id);\n\t\t}\n\t\treturn apply_filters( 'jigoshop_product_get_price', $price, $this->variation_id );\n\n\t}", "public function currencyPrice()\n {\n \t$this->currencyPrice = CurrencyPrice::getCurrencyPrices($this->sellPrices->CurrencyNo)->BuyPrice;\n \treturn $this->currencyPrice > 0 ? $this->currencyPrice : 1 ;\n }", "public function getProfit() {\n return round($this->getTotalPrice()*0.2, 2);\n }", "public function getFinanceFromPrice()\n {\n $product = $this->getProduct();\n $finaceFromPrice = $product->getData('finance_from_price');\n $price = Mage::helper('core')->currency($finaceFromPrice, true, false);\n\n return $price;\n }", "static function getPrice($procent , $price){\n return $price - ( $price / 100 * $procent);\n }", "public function getPrice() : float\n {\n return $this->get('price', 'products');\n }", "public function getProductPriceX()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/maximum_splits', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "public function getPriceAttribute()\n {\n if (isset($this->attributes['price'])) {\n return $this->attributes['price'] / 100;\n }\n\n return null;\n }", "public function get_price(){\n\t\treturn $this->price;\n\t}", "public function getPrice():float\n {\n return $this->price;\n }", "public function getFinalPrice()\n {\n return ($this->sale_price > 0) ? $this->sale_price : $this->price;\n }", "public function getPrice() {\n\t\treturn($this->price);\n\t}", "public function getPrice()\n\t{\n\t\treturn $this->isDiscounted() ? 0.0 : floatval($this->price);\n\t}", "public function getPrice()\n\t{\n\t\t$total = intval($this->var['price']);\n\t\t$d = $total/100;\n\t\t$c = $total%100;\n\t\treturn sprintf(\"%d.%02d\",$d,$c);\n\t\t//return \"$d.$c\";\n\t}", "public function getCalculatedFinalPrice()\n {\n return $this->_getData('calculated_final_price');\n }", "public function getProductPrice(){\n return $this->product_price;\n }", "public function getPaymentPrice() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->paymentPrice;\r\n\t}", "public function getPrice()\n\t{\n\t\treturn $this->price;\n\t}" ]
[ "0.68424267", "0.6395525", "0.6274206", "0.61656374", "0.61491066", "0.61201084", "0.6116658", "0.6059438", "0.60510963", "0.5940293", "0.58956015", "0.587776", "0.58571327", "0.5856519", "0.58443177", "0.5826923", "0.5826112", "0.58171475", "0.5777953", "0.5754116", "0.5738691", "0.5738257", "0.57189035", "0.5706587", "0.56995255", "0.56903124", "0.56653976", "0.56610376", "0.5652148", "0.56442666" ]
0.8628817
0
Get the [operation_prime_maximum_amount] column value.
public function getOperationPrimeMaximumAmount() { return $this->operation_prime_maximum_amount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationPrimeFixedAmount()\n {\n\n return $this->operation_prime_fixed_amount;\n }", "public function getMaxPriceInt()\n {\n $stats = $this->_getFieldStats();\n $max = $stats['max'];\n if (!is_numeric($max)) {\n $max = parent::getMaxPriceInt();\n }\n return $max;\n }", "public function getMaximumAmountPerMonth()\n {\n return $this->maximumAmountPerMonth;\n }", "public function getMaximumAmount()\n\t{\n\t\treturn ['amount' => 5000.00, 'currency' => 'EUR'];\n\t}", "public function GetMaxAmount()\n\t {\n\t\t return $this->db->query(\"select MAX(TotalPrice) as price from tb_products\")->row_array(); \n\t }", "public function getMaxPrice() {\n return $this->get(self::MAXPRICE);\n }", "public function getMaximum() {\r\n return $this->maximumvalue;\r\n }", "function get_price_max_amount( $amount ) {\n\t\treturn $this->price_max;\n\t}", "public function getMaximalPrice()\n {\n if (!$this->maximalPrice) {\n $maximalPrice = $this->product->getMaximalPrice();\n if ($maximalPrice === null) {\n $maximalPrice = $this->getValue();\n } else {\n $maximalPrice = $this->priceCurrency->convertAndRound($maximalPrice);\n }\n $this->maximalPrice = $this->calculator->getAmount($maximalPrice, $this->product);\n }\n return $this->maximalPrice;\n }", "public static function get_max_value() {\n return self::MAX_VALUE;\n }", "public function get_max_product_price()\n\t{\n\t\t$this->db->select('MAX(product_selling_price) AS price')->from('product')->where(\"product_status = 1\");\n\t\t$query = $this->db->get();\n\t\t$result = $query->row();\n\t\t\n\t\treturn $result->price;\n\t}", "public function getMaxValue()\n {\n return $this->get('MaxValue');\n }", "public function getMaxNumber()\n {\n return $this->maxNumber;\n }", "public function maxNumber(): int\n {\n try {\n return (int) $this->createQueryBuilder('b')\n ->select('max(b.number) as maxi')\n ->getQuery()\n ->getSingleScalarResult()\n ;\n } catch (NonUniqueResultException $exception) {\n //this should not be reached.\n return 0;\n } catch (NoResultException $exception) {\n return 0;\n }\n }", "public function getMaxPrice()\n\n {\n\n return $this->maxPrice;\n }", "public function setOperationPrimeMaximumAmount($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_string($v)){\n $v = str_replace(\n array(' ',','),\n array('','.'),\n $v\n );\n }\n \n if(is_numeric($v)) {\n $v = (float) $v;\n }\n }\n if ($this->operation_prime_maximum_amount !== $v) {\n $this->operation_prime_maximum_amount = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT;\n }\n\n\n return $this;\n }", "public function getMax()\n {\n return $this->_fields['Max']['FieldValue'];\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "function getMax() { return $this->readMaxValue(); }", "public function getMaximumLoanAmount()\n\t{\n\t\treturn $this->max_loan_amount;\n\t}", "public function getMaximum()\n {\n return $this->max;\n }", "protected function getCashMax()\n\t{\n\t\treturn $this->ut->up->rank['number'] / count(\\game::$ranks['items']) * $this->cash_max_real / 2 + $this->cash_max_real / 2;\n\t}", "public function getMaximumQuantity()\n {\n return $this->maximumQuantity;\n }", "public function getMaximum()\n {\n return $this->maximum;\n }", "public function getMax()\n {\n return $this->_maxValue;\n }", "public function getMax()\n {\n return $this->_fMax;\n }", "public function getMaxValue();", "public function getMaxValue();", "public function getMax() {\n return $this->max;\n }" ]
[ "0.65634733", "0.6449375", "0.6447475", "0.64324164", "0.6414635", "0.6414212", "0.6369714", "0.6368224", "0.63564134", "0.63075167", "0.6303096", "0.6262085", "0.6239464", "0.62193793", "0.61821467", "0.6166045", "0.6160484", "0.6154595", "0.6154595", "0.61134857", "0.61012185", "0.6098445", "0.60959333", "0.60919845", "0.6079249", "0.6053305", "0.6022266", "0.60146767", "0.60146767", "0.60086286" ]
0.83265495
0
Set the value of [op_prime_id] column.
public function setOpPrimeId($v) { if ($v === ''){ $v = null; } elseif ($v !== null){ if(is_numeric($v)) { $v = (int) $v; } } if ($this->op_prime_id !== $v) { $this->op_prime_id = $v; $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOpId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_id !== $v) {\n $this->op_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_ID;\n }\n\n if ($this->aOperations !== null && $this->aOperations->getOpId() !== $v) {\n $this->aOperations = null;\n }\n\n\n return $this;\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function setOpPrimeNumero($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_numero !== $v) {\n $this->op_prime_numero = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_NUMERO;\n }\n\n\n return $this;\n }", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "public function setPrimaryKey($key)\n {\n $this->setOpPrimeId($key);\n }", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "protected function setProduct_id($value)\n\t{\n\t\tif (isInt($value) || is_null($value)) { $this->product_id = $value; }\n\t}", "public function getPrimaryKey()\n {\n return $this->getOpPrimeId();\n }", "public function setOperationPrimeRRewardExpeditionModeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_expedition_mode_id !== $v) {\n $this->operation_prime_r_reward_expedition_mode_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID;\n }\n\n if ($this->aRRewardExpeditionModes !== null && $this->aRRewardExpeditionModes->getRRewardExpeditionModeId() !== $v) {\n $this->aRRewardExpeditionModes = null;\n }\n\n\n return $this;\n }", "public function setOpPrimeLibelle($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->op_prime_libelle !== $v) {\n $this->op_prime_libelle = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE;\n }\n\n\n return $this;\n }", "public function setCubosTiposId($data)\n {\n\n if ($this->_cubosTiposId != $data) {\n $this->_logChange('cubosTiposId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_cubosTiposId = $data;\n } else if (!is_null($data)) {\n $this->_cubosTiposId = (int) $data;\n } else {\n $this->_cubosTiposId = $data;\n }\n return $this;\n }", "static public function OpAssignOp ($op) {\n\t\treturn new Binop('OpAssignOp', 20, [$op]);\n\t}", "public function setPrecinctId($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\n\t\tif ($this->precinct_id !== $v) {\n\t\t\t$this->precinct_id = $v;\n\t\t\t$this->modifiedColumns[] = MmPeer::PRECINCT_ID;\n\t\t}\n\n\t\tif ($this->aPrecinct !== null && $this->aPrecinct->getId() !== $v) {\n\t\t\t$this->aPrecinct = null;\n\t\t}\n\n\t}", "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 }", "public function setCompteIdAttribute($input)\n {\n $this->attributes['compte_id'] = $input ? $input : null;\n }", "public function set_id_pg($id=0){\n\t\t\t$id = (int) $id;\n\t\t\tif($id!=0){\n\t\t\t\t$this->ipg_id=$id;\n\t\t\t}else{\n\t\t\t\t$this->ipg_id=0;\n\t\t\t}\n\t\t}", "public function setCentrosEmergenciaId($data)\n {\n\n if ($this->_centrosEmergenciaId != $data) {\n $this->_logChange('centrosEmergenciaId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_centrosEmergenciaId = $data;\n } else if (!is_null($data)) {\n $this->_centrosEmergenciaId = (int) $data;\n } else {\n $this->_centrosEmergenciaId = $data;\n }\n return $this;\n }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setEmpId($val){\n\t\tif(intval($val) > 0){\n\t\t\t$this->employeeId = intval($val);\n\t\t}\t\t\n\t\treturn $this;\n\t}", "public function setCuboId($data)\n {\n\n if ($this->_cuboId != $data) {\n $this->_logChange('cuboId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_cuboId = $data;\n } else if (!is_null($data)) {\n $this->_cuboId = (int) $data;\n } else {\n $this->_cuboId = $data;\n }\n return $this;\n }", "public function getOpId()\n {\n\n return $this->op_id;\n }", "public function setEtatCmdIdAttribute($input)\n {\n $this->attributes['etat_cmd_id'] = $input ? $input : null;\n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "function SetId($value) { $this->id=$value; }", "public function set_idnumber($value) {\r\n $this->idnumber = $value;\r\n data::add(\"idnumber\", $this->idnumber == \"\" ? NODATA : input::santize($this->idnumber), $this->table_fields);\r\n }" ]
[ "0.70000744", "0.69464374", "0.6362339", "0.6270644", "0.5910605", "0.5812543", "0.5671231", "0.5596519", "0.5596519", "0.5568444", "0.5216141", "0.5169974", "0.51482946", "0.51230294", "0.5119571", "0.49663097", "0.49595487", "0.49336648", "0.49336648", "0.4933062", "0.49271995", "0.49056584", "0.49029747", "0.4898448", "0.4887591", "0.48828372", "0.4882207", "0.4839877", "0.48340917", "0.4829764" ]
0.7637416
0
setOpPrimeId() Set the value of [op_id] column.
public function setOpId($v) { if ($v === ''){ $v = null; } elseif ($v !== null){ if(is_numeric($v)) { $v = (int) $v; } } if ($this->op_id !== $v) { $this->op_id = $v; $this->modifiedColumns[] = OperationPrimesPeer::OP_ID; } if ($this->aOperations !== null && $this->aOperations->getOpId() !== $v) { $this->aOperations = null; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function setOpPrimeNumero($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_numero !== $v) {\n $this->op_prime_numero = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_NUMERO;\n }\n\n\n return $this;\n }", "public function setPrimaryKey($key)\n {\n $this->setOpPrimeId($key);\n }", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setOperationPrimeRRewardExpeditionModeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_expedition_mode_id !== $v) {\n $this->operation_prime_r_reward_expedition_mode_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID;\n }\n\n if ($this->aRRewardExpeditionModes !== null && $this->aRRewardExpeditionModes->getRRewardExpeditionModeId() !== $v) {\n $this->aRRewardExpeditionModes = null;\n }\n\n\n return $this;\n }", "public function setOpPrimeLibelle($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->op_prime_libelle !== $v) {\n $this->op_prime_libelle = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE;\n }\n\n\n return $this;\n }", "static public function OpAssignOp ($op) {\n\t\treturn new Binop('OpAssignOp', 20, [$op]);\n\t}", "public function getPrimaryKey()\n {\n return $this->getOpPrimeId();\n }", "public function getOpId()\n {\n\n return $this->op_id;\n }", "function SetId($value) { $this->id=$value; }", "public function setCubosTiposId($data)\n {\n\n if ($this->_cubosTiposId != $data) {\n $this->_logChange('cubosTiposId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_cubosTiposId = $data;\n } else if (!is_null($data)) {\n $this->_cubosTiposId = (int) $data;\n } else {\n $this->_cubosTiposId = $data;\n }\n return $this;\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 }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "public function setPosteId($data)\n {\n\n if ($this->_posteId != $data) {\n $this->_logChange('posteId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_posteId = $data;\n } else if (!is_null($data)) {\n $this->_posteId = (int) $data;\n } else {\n $this->_posteId = $data;\n }\n return $this;\n }", "public function setId($pId) {\n\t\t$this->Id = $pId;\n\t}", "public function set_id_pg($id=0){\n\t\t\t$id = (int) $id;\n\t\t\tif($id!=0){\n\t\t\t\t$this->ipg_id=$id;\n\t\t\t}else{\n\t\t\t\t$this->ipg_id=0;\n\t\t\t}\n\t\t}", "function setPrimaryKey($pkey_name){\n\n\t\t$this->pkey = $pkey_name;\n\n\t}", "protected function setProduct_id($value)\n\t{\n\t\tif (isInt($value) || is_null($value)) { $this->product_id = $value; }\n\t}", "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "public function setPrecinctId($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\n\t\tif ($this->precinct_id !== $v) {\n\t\t\t$this->precinct_id = $v;\n\t\t\t$this->modifiedColumns[] = MmPeer::PRECINCT_ID;\n\t\t}\n\n\t\tif ($this->aPrecinct !== null && $this->aPrecinct->getId() !== $v) {\n\t\t\t$this->aPrecinct = null;\n\t\t}\n\n\t}", "protected function setMesto_id($value)\n\t{\n\t\tif (isInt($value) || is_null($value)) { $this->mesto_id = $value; }\n\t}", "public function setIdPROVEEDORES($idPROVEEDORES){\n $this->idPROVEEDORES = $idPROVEEDORES;\n }", "public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)\n {\n $pos = OperationPrimesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\n $this->setByPosition($pos, $value);\n }", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setCoParticipante($key);\n\t}" ]
[ "0.7645354", "0.6735857", "0.6311355", "0.60500765", "0.58966213", "0.54381555", "0.5321016", "0.5246689", "0.5246689", "0.52158755", "0.51608074", "0.5129233", "0.5099695", "0.50778925", "0.5020183", "0.5008836", "0.5005647", "0.5005647", "0.49662164", "0.49269044", "0.491931", "0.49159282", "0.48398042", "0.48320907", "0.48282912", "0.48233673", "0.4782082", "0.47726658", "0.4770143", "0.4759837" ]
0.73395073
1
setOpId() Set the value of [op_prime_libelle] column.
public function setOpPrimeLibelle($v) { if ($v !== null) { $v = (string) $v; } if ($this->op_prime_libelle !== $v) { $this->op_prime_libelle = $v; $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOpId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_id !== $v) {\n $this->op_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_ID;\n }\n\n if ($this->aOperations !== null && $this->aOperations->getOpId() !== $v) {\n $this->aOperations = null;\n }\n\n\n return $this;\n }", "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "public function getOpPrimeLibelle()\n {\n\n return $this->op_prime_libelle;\n }", "function setIdadeFilho( $iIndiceFilho, $iIdade ) {\n $this->{\"iIdadeFilho$iIndiceFilho\"} = $iIdade;\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "function initialiserId()\n {\n if(empty($this->m_idOption))\n {\n $requete = 'SELECT idOption FROM optionHotel WHERE libelleOption=? AND prixOption=?';\n $tabParametres = array($this->m_libelleOption, $this->m_prixOption);\n $tabResultat = $this->m_bdd->selection($requete, $tabParametres);\n $this->m_idOption = $tabResultat[0]['idOption']; \n }\n }", "public function setIdAtelier($valeur){\n $this->idAtelier = $valeur;\n }", "public function SetId($valor)\r\n\t{\r\n\t\t$this->id = $valor;\r\n\t}", "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 }", "public function setOpPrimeNumero($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_numero !== $v) {\n $this->op_prime_numero = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_NUMERO;\n }\n\n\n return $this;\n }", "public function SetIdConvocatoria($valor){\n\t\t $this->id_convocatoria= $valor;\n\t }", "function setIdComentaire($idCommentaire) {\n $this->idCommentaire = $idCommentaire;\n }", "public function setIdadeFilho1 ($iIdadeFilho1) {\n $this->iIdadeFilho1 = $iIdadeFilho1;\n }", "public function setIdadeFilho2 ($iIdadeFilho2) {\n $this->iIdadeFilho2 = $iIdadeFilho2;\n }", "public function setId($IDabbonamento)\n {\n $this->id = $IDabbonamento;\n }", "function set($idModelo, $idPedido=NULL, $idProduccion=NULL, $belongsTo=NULL, $idVenta=NULL){\r\n\t\t\r\n\t\ttry{\r\n\t\t\t$prod = array('modelos_id'=>$idModelo);\r\n\t\t\tif($idPedido != NULL)$prod['pedidos_id']= $idPedido;\r\n\t\t\tif($idProduccion != NULL)$prod['producciones_id']= $idProduccion;\r\n\t\t\tif($idVenta != NULL)$prod['ventas_id']= $idVenta;\r\n\t\t\tif($belongsTo != NULL)$prod['belongsTo']= $belongsTo;\r\n\t\t\t\r\n\t\t\tif(!$this->create($prod))\r\n\t\t\t\tthrow new BadRequestException('Hubo un error al agregar el producto a la cola de impresión.');\r\n\r\n\t\t\t//Agrego los modelos\r\n\t\t\t$idImp = $this->con->lastInsertID('colaimpresion', 'id');\r\n\t\t\t$prod['id']=$idImp;\r\n\t\t\t\t\t\t\t\r\n\t\t\treturn array('success'=>true, 'ColaImpresion'=>$prod);\r\n\t\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t\treturn array('success'=>false, 'msg'=>$e->getMsg());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "public function setIdAuteur($idauteur){\n\t\t$idauteur = (int) $idauteur;\n\t\t// On vérifie ensuite si ce nombre est bien strictement positif.\n\t\tif ($idauteur > 0){\n\t\t\t// Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut correspondant.\n\t\t\t$this->_idauteur = $idauteur;\n\t\t}\n\t}", "public function setOperador($operador)\r\n {\r\n // $this->_myParameters = $myParameters;\r\n $this->_OPERADOR = $operador;\r\n \t//$this->_OPERADOR='1';\r\n \t//Zend_Registry::get('logger')->log(\"testeddd\", Zend_Log::INFO);\r\n \t$projeto= new Application_Model_DbTable_Projeto();\r\n \t//$this->_PROJETOS=$projeto->getProjetoCombo() ;\r\n \t$this->_PROJETOS=$projeto->getProjetosOperadorPermissao($operador);\r\n \t\r\n }", "public function setOperationId($var)\n {\n GPBUtil::checkString($var, True);\n $this->operation_id = $var;\n\n return $this;\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 __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}", "function setId_serie($iid_serie)\n {\n $this->iid_serie = $iid_serie;\n }", "function setid_exp($val)\n { $this->id_exp=$val;}", "function setid_exp($val)\n { $this->id_exp=$val;}" ]
[ "0.6400785", "0.5944037", "0.54900444", "0.5470849", "0.54667693", "0.53647137", "0.5357475", "0.53508675", "0.53074986", "0.5305721", "0.5252752", "0.5252752", "0.5249579", "0.523691", "0.5098855", "0.50392437", "0.5018835", "0.5011726", "0.50029075", "0.49668217", "0.49652767", "0.49554974", "0.49474683", "0.493217", "0.49302", "0.49302", "0.49244422", "0.49113548", "0.48957142", "0.48957142" ]
0.60888827
1
setOpPrimeLibelle() Set the value of [op_prime_numero] column.
public function setOpPrimeNumero($v) { if ($v === ''){ $v = null; } elseif ($v !== null){ if(is_numeric($v)) { $v = (int) $v; } } if ($this->op_prime_numero !== $v) { $this->op_prime_numero = $v; $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_NUMERO; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOpPrimeLibelle($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->op_prime_libelle !== $v) {\n $this->op_prime_libelle = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE;\n }\n\n\n return $this;\n }", "public function getOpPrimeLibelle()\n {\n\n return $this->op_prime_libelle;\n }", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "public function setOperador($operador)\r\n {\r\n // $this->_myParameters = $myParameters;\r\n $this->_OPERADOR = $operador;\r\n \t//$this->_OPERADOR='1';\r\n \t//Zend_Registry::get('logger')->log(\"testeddd\", Zend_Log::INFO);\r\n \t$projeto= new Application_Model_DbTable_Projeto();\r\n \t//$this->_PROJETOS=$projeto->getProjetoCombo() ;\r\n \t$this->_PROJETOS=$projeto->getProjetosOperadorPermissao($operador);\r\n \t\r\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "function setComprobantePagoARegistroPago() {\n\t\tglobal $bd;\t\t\n\t\tglobal $x_correlativo_comprobante;\n\t\t$correlatico_comprobante = $x_correlativo_comprobante;\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$id_registro_pago = $_POST['idregistro_pago'];\n\n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\t\n\t\t$sqlrp=\"update registro_pago set idtipo_comprobante_serie=\".$idtipo_comprobante_serie.\" where idregistro_pago=\".$id_registro_pago;\n\t\t$idregistro_pago=$bd->xConsulta_NoReturn($sqlrp);\n\t}", "function setNumero($numero){\n if(empty($numero)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable numero puis on appelle la varibale prive numero\n $this->_numero = $numero;\n }", "public function setOperationNumber($value) {\n if(strlen($value) > 50 ){\n throw new ValueException(\"Value \".$value.\" is higher than 8\");\n }\n $this->Num_operacion = $value;\n }", "public function setOpId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_id !== $v) {\n $this->op_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_ID;\n }\n\n if ($this->aOperations !== null && $this->aOperations->getOpId() !== $v) {\n $this->aOperations = null;\n }\n\n\n return $this;\n }", "function __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}", "function set_pm_defecto($punto)\n\t{\n\t\t$db = $this->get_db();\n\t\t$id_punto = $db->quote($punto->get_id());\n\t\t$sql = \"UPDATE apex_proyecto\n\t\t\t\tSET pm_impresion = $id_punto,\n\t\t\t\t\tpm_sesion = $id_punto,\n\t\t\t\t\tpm_contexto = $id_punto,\n\t\t\t\t\tpm_usuario = $id_punto\n\t\t\t\tWHERE proyecto = \".$db->quote($this->identificador);\n\t\t$db->ejecutar($sql);\n\t}", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "public function testSetNumeroOrdre() {\n\n $obj = new EmpRecapCodePenibilite();\n\n $obj->setNumeroOrdre(10);\n $this->assertEquals(10, $obj->getNumeroOrdre());\n }", "public function setParcela(int $parcela)\n {\n $this->parcela = $parcela;\n }", "public function SetMaqOp($data){\n\t\t$data = (array)$data;\n\t\t\t\t\t$command = \\Yii::$app->db_mysql;\n\t\t\t$result = $command->createCommand()->insert('maquina_operador',[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'maquina' => $data['maquina'], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'operador' => $data['operador']\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t])->execute();\n\t\t\n\t}", "function modificarNumFilhos($numFilhos) {\r\n $this->numFilhos = $numFilhos;\r\n }", "function setChangeCodigo($numero_nuevo){\n\t\t\t$numero_socio \t= $this->mCodigo ;\n\t\t\t\n\t\t\t$xQL\t\t\t= new MQL();\n\t\t\t$msg = \"\";\n\t\t\t$msg .= \"================== MODIFICANDO UN NUMERO DE SOCIO \\r\\n\";\n\t\t\t$msg .= \"================== SE ACTUALIZA DEL $numero_socio AL $numero_nuevo \\r\\n\";\n\n\t\t\t$var[\"aml_alerts\"]\t\t\t\t\t= \"persona_de_destino\";\n\t\t\t$var[\"aml_risk_register\"]\t\t\t= \"persona_relacionada\";\n\t\t\t$var[\"bancos_operaciones\"]\t\t\t= \"numero_de_socio\";\n\t\t\t$var[\"captacion_cuentas\"]\t\t\t= \"numero_socio\";\n\t\t\t$var[\"captacion_sdpm_historico\"]\t= \"numero_de_socio\";\n\t\t\t$var[\"contable_polizas_proforma\"]\t= \"socio\";\n\t\t\t$var[\"creditos_flujoefvo\"]\t\t\t= \"socio_flujo\";\n\t\t\t$var[\"creditos_garantias\"]\t\t\t= \"socio_garantia\";\n\t\t\t$var[\"creditos_lineas\"]\t\t\t\t= \"numero_socio\";\n\t\t\t$var[\"creditos_parametros_negociados\"]\t= \"numero_de_socio\";\n\t\t\t$var[\"creditos_sdpm_historico\"]\t\t= \"numero_de_socio\";\n\t\t\t$var[\"creditos_solicitud\"]\t\t\t= \"numero_socio\";\n\t\t\t\n\t\t\t$var[\"general_sucursales\"]\t\t\t= \"clave_de_persona\";\n\t\t\t$var[\"operaciones_mvtos\"]\t\t\t= \"socio_afectado\";\n\t\t\t$var[\"operaciones_recibos\"]\t\t\t= \"numero_socio\";\n\t\t\t\n\t\t\t$var[\"personas_documentacion\"]\t\t= \"clave_de_persona\";\n\t\t\t$var[\"personas_perfil_transaccional\"]\t= \"clave_de_persona\";\n\t\t\t$var[\"seguimiento_compromisos\"]\t\t= \"socio_comprometido\";\n\t\t\t$var[\"seguimiento_llamadas\"]\t\t= \"numero_socio\";\n\t\t\t$var[\"seguimiento_notificaciones\"]\t= \"socio_notificado\";\n\t\t\t$var[\"socios_aeconomica\"]\t\t\t= \"socio_aeconomica\";\n\t\t\t$var[\"socios_aeconomica_dependencias\"]\t= \"clave_de_persona\";\n\t\t\t$var[\"socios_aportaciones\"]\t\t\t= \"numero_socio\";\n\t\t\t$var[\"socios_baja\"]\t\t\t\t\t= \"numero_de_socio\";\n\t\t\t$var[\"socios_cajalocal\"]\t\t\t= \"ultimosocio\";\n\t\t\t$var[\"socios_firmas\"]\t\t\t\t= \"numero_de_socio\";\n\t\t\t$var[\"socios_general\"]\t\t\t\t= \"codigo\";\n\n\t\t\t$var[\"socios_grupossolidarios\"]\t\t= \"clave_de_persona\";\n\t\t\t$var[\"socios_memo\"]\t\t\t\t\t= \"numero_socio\";\n\t\t\t$var[\"socios_otros_parametros\"]\t\t= \"clave_de_persona\";\n\t\t\t$var[\"socios_patrimonio\"]\t\t\t= \"socio_patrimonio\";\n\t\t\t$var[\"socios_relaciones\"]\t\t\t= \"socio_relacionado\";\n\t\t\t\n\t\t\t$var[\"socios_scoring_simple\"]\t\t= \"numero_socio\";\n\t\t\t$var[\"socios_vivienda\"]\t\t\t\t= \"socio_numero\";\n\t\t\t$var[\"t_03f996214fba4a1d05a68b18fece8e71\"]\t= \"codigo_de_persona\";\n\t\t\t$var[\"tesoreria_cajas_movimientos\"]\t= \"persona\";\n\t\t\t$var[\"usuarios\"]\t\t\t\t\t= \"codigo_de_persona\";\n\t\t\t$var[\"usuarios_web_notas\"]\t\t\t= \"socio\";\n\t\t\tforeach ($var as $tabla => $campo){\n\t\t\t\t$msg\t.= \"WARN\\tCambiar Registros de la Tabla $tabla, Campo $campo de $numero_socio a $numero_nuevo\\r\\n\";\n\t\t\t\t$xQL->setRawQuery(\"UPDATE $tabla SET $campo = $numero_nuevo WHERE $campo = $numero_socio\");\n\t\t\t}\n\t\t\t$var2[\"aml_alerts\"]\t\t\t\t\t= \"persona_de_origen\";\n\t\t\t$var2[\"creditos_solicitud\"]\t\t\t= \"persona_asociada\";\n\t\t\t$var2[\"operaciones_recibos\"]\t\t\t= \"persona_asociada\";\n\t\t\t$var2[\"socios_relaciones\"]\t\t\t= \"numero_socio\";\n\t\t\t$var2[\"socios_grupossolidarios\"]\t\t= \"representante_numerosocio\";\n\t\t\t//$var2[\"socios_grupossolidarios\"]\t\t= \"vocalvigilancia_numerosocio\";\t\t\t\n\t\t\tforeach ($var2 as $tabla => $campo){\n\t\t\t\t$msg\t.= \"WARN\\tCambiar Registros de la Tabla $tabla, Campo $campo de $numero_socio a $numero_nuevo\\r\\n\";\n\t\t\t\t$xQL->setRawQuery(\"UPDATE $tabla SET $campo = $numero_nuevo WHERE $campo = $numero_socio\");\n\t\t\t}\n\t\treturn $msg;\n\t}", "function setNota_num($inota_num = '')\n {\n // adminto ',' como separador decimal.\n $inota_num = str_replace(\",\", \".\", $inota_num);\n $this->inota_num = $inota_num;\n }", "public function setNumeroIP( $numero ) {\n $this->numero_ip=$numero;\n $this->enviarNumero();\n $this->activarPantalla();\n //activar y enviar numero\n }", "function setNota_num($inota_num = '')\n {\n $this->inota_num = $inota_num;\n }", "public function setNumcompte($numcompte)\n {\n $this->numcompte = $numcompte;\n }", "public function testSetNumeroPermis() {\n\n $obj = new Employes();\n\n $obj->setNumeroPermis(\"numeroPermis\");\n $this->assertEquals(\"numeroPermis\", $obj->getNumeroPermis());\n }", "function setSoporte($soporte) {\r\n $this->soporte = $soporte;\r\n }", "function modificarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_ime';\n\t\t$this->transaccion='ADQ_PROC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t$this->setParametro('num_convocatoria','num_convocatoria','varchar');\n\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('fecha_ini_proc','fecha_ini_proc','date');\n\t\t$this->setParametro('obs_proceso','obs_proceso','varchar');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('num_tramite','num_tramite','varchar');\n\t\t$this->setParametro('codigo_proceso','codigo_proceso','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('num_cotizacion','num_cotizacion','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)\n {\n $pos = OperationPrimesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\n $this->setByPosition($pos, $value);\n }", "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete;\n\n foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) {\n $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null);\n }\n\n $this->collLnkOperationPrimeRCountriess = null;\n foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) {\n $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries);\n }\n\n $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n\n return $this;\n }", "public function setOperationPrimeMaximumAmount($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_string($v)){\n $v = str_replace(\n array(' ',','),\n array('','.'),\n $v\n );\n }\n \n if(is_numeric($v)) {\n $v = (float) $v;\n }\n }\n if ($this->operation_prime_maximum_amount !== $v) {\n $this->operation_prime_maximum_amount = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT;\n }\n\n\n return $this;\n }", "public function updateprematricula($db, $numeroordenpago, $digitoprematricula ){\n $strPrematricula = \"UPDATE prematricula SET codigoestadoprematricula='4\".$digitoprematricula.\"' WHERE \".\n \" idprematricula = (select d.idprematricula from detalleprematricula d \".\n \" where d.numeroordenpago = '\".$numeroordenpago.\"' limit 1)\";\n return is_object($db->Execute($strPrematricula));\n }", "public function setOperationPrimeProductPricePourcentage($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_product_price_pourcentage !== $v) {\n $this->operation_prime_product_price_pourcentage = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE;\n }\n\n\n return $this;\n }" ]
[ "0.70246905", "0.63940185", "0.61862445", "0.61179996", "0.56006974", "0.54776704", "0.5434198", "0.5344516", "0.5338527", "0.5286343", "0.52756554", "0.5219183", "0.5157126", "0.5111251", "0.5043052", "0.5037178", "0.50180155", "0.50172955", "0.50164115", "0.50139993", "0.49919832", "0.4978429", "0.49697614", "0.49468884", "0.4907251", "0.4899173", "0.48899448", "0.48830318", "0.48786223", "0.48646942" ]
0.68324995
1
setOpPrimeNumero() Set the value of [gdl_art_id] column.
public function setGdlArtId($v) { if ($v === ''){ $v = null; } elseif ($v !== null){ if(is_numeric($v)) { $v = (int) $v; } } if ($this->gdl_art_id !== $v) { $this->gdl_art_id = $v; $this->modifiedColumns[] = OperationPrimesPeer::GDL_ART_ID; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOpPrimeNumero($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_numero !== $v) {\n $this->op_prime_numero = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_NUMERO;\n }\n\n\n return $this;\n }", "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function setOpId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_id !== $v) {\n $this->op_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_ID;\n }\n\n if ($this->aOperations !== null && $this->aOperations->getOpId() !== $v) {\n $this->aOperations = null;\n }\n\n\n return $this;\n }", "public function setOpPrimeLibelle($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->op_prime_libelle !== $v) {\n $this->op_prime_libelle = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE;\n }\n\n\n return $this;\n }", "function setEditableManufacturerID($epmid)\n {\n// if ($this->isCorrectManufacturerId($epmid))\n// {\n $this->editableManufacturerID = $epmid;\n// }\n }", "function setComprobantePagoARegistroPago() {\n\t\tglobal $bd;\t\t\n\t\tglobal $x_correlativo_comprobante;\n\t\t$correlatico_comprobante = $x_correlativo_comprobante;\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$id_registro_pago = $_POST['idregistro_pago'];\n\n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\t\n\t\t$sqlrp=\"update registro_pago set idtipo_comprobante_serie=\".$idtipo_comprobante_serie.\" where idregistro_pago=\".$id_registro_pago;\n\t\t$idregistro_pago=$bd->xConsulta_NoReturn($sqlrp);\n\t}", "public function __set($propriedade, $valor) {\n $this->data[$propriedade] = $valor;\n }", "public function getGdlArtId()\n {\n\n return $this->gdl_art_id;\n }", "public function obtenerIDPrimerPagoElectronico(){\n $criteria = new CDbCriteria;\n $criteria->condition = 'id_pedido = '.$this->id_pedido;\n $registrosCarro = PagosElectronicos::model()->findAll($criteria);\n\n if (sizeof($registrosCarro) > 0)\n return $registrosCarro[0]->id;\n return 0;\n }", "function setNota_num($inota_num = '')\n {\n $this->inota_num = $inota_num;\n }", "public function setCentrosEmergenciaId($data)\n {\n\n if ($this->_centrosEmergenciaId != $data) {\n $this->_logChange('centrosEmergenciaId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_centrosEmergenciaId = $data;\n } else if (!is_null($data)) {\n $this->_centrosEmergenciaId = (int) $data;\n } else {\n $this->_centrosEmergenciaId = $data;\n }\n return $this;\n }", "private function setidArt($newidArt)\n\t {\n\t $this->idArt = $newidArt;\n\t }", "private function setidArt($newidArt)\n\t {\n\t $this->idArt = $newidArt;\n\t }", "private function setidArt($newidArt)\n\t {\n\t $this->idArt = $newidArt;\n\t }", "function getLoteIdGenerado($prov_id, $arti_id, $depo_id, $cod_lote){\n\n\t\t$empr_id = empresa();\n\t\t$url = AJST.'/services/asp/ALMDataService/lote/id/prov_id/'.$prov_id.'/arti_id/'.$arti_id.'/depo_id/'.$depo_id.'/empr_id/'.$empr_id.'/cod_lote/'.$cod_lote;\n\t\t$aux = $this->rest->callAPI(\"GET\",$url);\n\t\t$aux =json_decode($aux[\"data\"]);\n\t\treturn $aux->lote->lote_id;\n\t}", "public function updateprematricula($db, $numeroordenpago, $digitoprematricula ){\n $strPrematricula = \"UPDATE prematricula SET codigoestadoprematricula='4\".$digitoprematricula.\"' WHERE \".\n \" idprematricula = (select d.idprematricula from detalleprematricula d \".\n \" where d.numeroordenpago = '\".$numeroordenpago.\"' limit 1)\";\n return is_object($db->Execute($strPrematricula));\n }", "public function testSetNumeroOrdre() {\n\n $obj = new EmpRecapCodePenibilite();\n\n $obj->setNumeroOrdre(10);\n $this->assertEquals(10, $obj->getNumeroOrdre());\n }", "function setEpoca($iepoca = '')\n {\n $this->iepoca = $iepoca;\n }", "function editar_pr_factura(){\n\n\t\t $u = new entrada();\n $u->usuario_id = $GLOBALS['usuarioid'];\n $u->empresas_id = $GLOBALS['empresaid'];\n\t$precio=$_POST['costo_unitario'];\n\t$producto_id=$_POST['cproductos_id'];\n $u->fecha = date(\"Y-m-d H:i:s\");\n $related = $u->from_array($_POST);\n if ($u->id == 0)\n unset($u->id);\n if ($u->save($related)) {\n$this->db->query(\"update cproductos set precio_compra='$precio' where id=$producto_id\");\n echo $u->id;\n } else\n echo 0; \n \n\t}", "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "public function _setEntregable($data)\n {\n try {\n $id = (int)$data['entregableid'];\n if ($id == 0) {\n $sql = $this->_db->query(\"select codigo_prop_proy from proyecto where\n proyectoid = '\".$data['proyectoid'].\"'\");\n $codigo = $sql->fetch();\n $ent = $this->createRow();\n $ent->codigo_prop_proy = $codigo['codigo_prop_proy'];\n $ent->proyectoid = $data['proyectoid'];\n $ent->revision_entregable = 'A';\n $ent->edt = '000';\n $ent->tipo_documento = $data['tipo_documento'];\n $ent->disciplina = $data['disciplina'];\n $ent->codigo_anddes = $data['codigo_anddes'];\n $ent->codigo_cliente = $data['codigo_cliente'];\n $ent->descripcion_entregable = $data['descripcion'];\n $ent->estado = 'Ultimo';\n $ent->clase = $data['clase'];\n $ent->revision_documento = $data['revision'];\n $ent->estado_entregable = 9;\n $ent->save();\n $resp['resultado'] = 'guardado';\n return $resp;\n } else {\n $ent = $this->fetchRow('cod_le = '.$id);\n $ent->tipo_documento = $data['tipo_documento'];\n $ent->disciplina = $data['disciplina'];\n $ent->codigo_anddes = $data['codigo_anddes'];\n $ent->codigo_cliente = $data['codigo_cliente'];\n $ent->descripcion_entregable = $data['descripcion'];\n $ent->save();\n $resp['resultado'] = 'guardado';\n return $resp;\n }\n return $id;\n } catch (Exception $e) {\n print $e->getMessage();\n }\n }", "public function setEmpleado_idemp($empleado_idemp){\n $this->empleado_idemp = $empleado_idemp;\n }", "function setNota_num($inota_num = '')\n {\n // adminto ',' como separador decimal.\n $inota_num = str_replace(\",\", \".\", $inota_num);\n $this->inota_num = $inota_num;\n }", "public function set_pedido(Pedido $p){\n $this->pedido=$p;\n }", "function set_pm_defecto($punto)\n\t{\n\t\t$db = $this->get_db();\n\t\t$id_punto = $db->quote($punto->get_id());\n\t\t$sql = \"UPDATE apex_proyecto\n\t\t\t\tSET pm_impresion = $id_punto,\n\t\t\t\t\tpm_sesion = $id_punto,\n\t\t\t\t\tpm_contexto = $id_punto,\n\t\t\t\t\tpm_usuario = $id_punto\n\t\t\t\tWHERE proyecto = \".$db->quote($this->identificador);\n\t\t$db->ejecutar($sql);\n\t}", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "function\tassignERPNos( $_key=\"\", $_id=-1, $_val=\"\") {\n\t\ttry {\n\t\t\tif ( $this->SupplierPrefix == \"\") {\n\t\t\t\t$e\t=\t\"Supplier.php::Supplier::assignERPNos(...): supplier does not have prefix assigned\" ;\n\t\t\t\terror_log( $e) ;\n\t\t\t\tthrow new Exception( $e) ;\n\t\t\t}\n\t\t\tif ( $this->ERPNoStart == \"\") {\n\t\t\t\t$e\t=\t\"Supplier.php::Supplier::assignERPNos(...): supplier does not have vallid ERP no. range\" ;\n\t\t\t\terror_log( $e) ;\n\t\t\t\tthrow new Exception( $e) ;\n\t\t\t}\n\t\t\t$myArticle\t=\tnew Article() ;\n\t\t\tfor ( $myArticle->_firstFromDb( \"ArticleNr like '\" . $this->SupplierPrefix . \".%' AND ERPNo = '' \") ;\n\t\t\t\t\t$myArticle->_valid ;\n\t\t\t\t\t$myArticle->_firstFromDb( \"ArticleNr like '\" . $this->SupplierPrefix . \".%' AND ERPNo = '' \")) {\n\t\t\t\tFDbg::dumpL( \"0x00000002\", \"Supplier.php::Supplier::assignERPNo(...): current article no. '$myArticle->ArticleNr'\") ;\n\t\t\t\ttry {\n\t\t\t\t\t$erpNoStart\t=\t$this->ERPNoStart ;\n\t\t\t\t\t$erpNoEnd\t=\t$this->ERPNoEnd ;\n\t\t\t\t\t$myQuery\t=\t\"SELECT IFNULL(( SELECT ERPNo + 1 FROM Article \" .\n\t\t\t\t\t\t\t\t\t\"WHERE ArticleNr LIKE '\".$this->SupplierPrefix.\".%' AND ERPNo >= '$erpNoStart' AND ERPNo <= '$erpNoEnd' \" .\n\t\t\t\t\t\t\t\t\t\"ORDER BY ERPNo DESC LIMIT 1 ), \" . ( $erpNoStart + 1) . \" ) AS newKey\" ;\n\t\t\t\t\t$myRow\t=\tFDb::queryRow( $myQuery) ;\n\t\t\t\t\t$myArticle->ERPNo\t=\tsprintf( \"%08s\", $myRow['newKey']) ;\n\t\t\t\t\t$myArticle->updateColInDb( \"ERPNo\") ;\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\tthrow $e ;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch( Exception $e) {\n\t\t\tthrow $e ;\n\t\t}\n\t\treturn true ;\n\t}", "public function setPosteId($data)\n {\n\n if ($this->_posteId != $data) {\n $this->_logChange('posteId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_posteId = $data;\n } else if (!is_null($data)) {\n $this->_posteId = (int) $data;\n } else {\n $this->_posteId = $data;\n }\n return $this;\n }" ]
[ "0.6233631", "0.6034504", "0.5551276", "0.54178816", "0.5288946", "0.5272168", "0.51445645", "0.51422405", "0.51296794", "0.4999414", "0.4962086", "0.4954606", "0.48946822", "0.4889888", "0.4889888", "0.4889888", "0.48810947", "0.48737988", "0.48709202", "0.48494264", "0.48418885", "0.48341712", "0.48220778", "0.48143247", "0.4813027", "0.48001397", "0.47641817", "0.47632006", "0.47483182", "0.4738265" ]
0.638567
0
setOperationPrimeCurrencyId() Set the value of [operation_prime_r_reward_type_id] column.
public function setOperationPrimeRRewardTypeId($v) { if ($v === ''){ $v = null; } elseif ($v !== null){ if(is_numeric($v)) { $v = (int) $v; } } if ($this->operation_prime_r_reward_type_id !== $v) { $this->operation_prime_r_reward_type_id = $v; $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID; } if ($this->aRRewardTypes !== null && $this->aRRewardTypes->getRRewardTypeId() !== $v) { $this->aRRewardTypes = null; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationPrimeRRewardTypeId()\n {\n\n return $this->operation_prime_r_reward_type_id;\n }", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "public function setOperationPrimeRRewardExpeditionModeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_expedition_mode_id !== $v) {\n $this->operation_prime_r_reward_expedition_mode_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID;\n }\n\n if ($this->aRRewardExpeditionModes !== null && $this->aRRewardExpeditionModes->getRRewardExpeditionModeId() !== $v) {\n $this->aRRewardExpeditionModes = null;\n }\n\n\n return $this;\n }", "public function getOperationPrimeRRewardExpeditionModeId()\n {\n\n return $this->operation_prime_r_reward_expedition_mode_id;\n }", "public function setOperationPrimeRRewardTransporterId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_transporter_id !== $v) {\n $this->operation_prime_r_reward_transporter_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID;\n }\n\n if ($this->aRRewardTransporters !== null && $this->aRRewardTransporters->getRRewardTransporterId() !== $v) {\n $this->aRRewardTransporters = null;\n }\n\n\n return $this;\n }", "public function setId_recette($id_recette)\n {\n $id_recette = (int) $id_recette;\n $this->_id_recette = $id_recette;\n }", "public function set_scoring_type($scoring_type)\n {\n $this->scoring_type = $scoring_type;\n }", "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "public function setCommissionType($commissionTypeKey)\n\t{\n\t\tif (!array_key_exists($commissionTypeKey, $this->commissionTypes)) {\n\t\t\tthrow new Exception('Commission type \"' . $commissionTypeKey . '\" not registered...', 1);\n\t\t}\n\t\t$this->attributes['commission_type'] = $commissionTypeKey;\n\t}", "public function getOperationPrimeRRewardTransporterId()\n {\n\n return $this->operation_prime_r_reward_transporter_id;\n }", "public function setType( Quantifier $type ): void {\n\t\t\t$this->type = $type;\n\t\t}", "public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)\n {\n $keys = OperationPrimesPeer::getFieldNames($keyType);\n\n if (array_key_exists($keys[0], $arr)) $this->setOpPrimeId($arr[$keys[0]]);\n if (array_key_exists($keys[1], $arr)) $this->setOpId($arr[$keys[1]]);\n if (array_key_exists($keys[2], $arr)) $this->setOpPrimeLibelle($arr[$keys[2]]);\n if (array_key_exists($keys[3], $arr)) $this->setOpPrimeNumero($arr[$keys[3]]);\n if (array_key_exists($keys[4], $arr)) $this->setGdlArtId($arr[$keys[4]]);\n if (array_key_exists($keys[5], $arr)) $this->setOperationPrimeCurrencyId($arr[$keys[5]]);\n if (array_key_exists($keys[6], $arr)) $this->setOperationPrimeRRewardTypeId($arr[$keys[6]]);\n if (array_key_exists($keys[7], $arr)) $this->setOperationPrimeRRewardExpeditionModeId($arr[$keys[7]]);\n if (array_key_exists($keys[8], $arr)) $this->setOperationPrimeRRewardTransporterId($arr[$keys[8]]);\n if (array_key_exists($keys[9], $arr)) $this->setOperationPrimeFixedAmount($arr[$keys[9]]);\n if (array_key_exists($keys[10], $arr)) $this->setOperationPrimeProductPricePourcentage($arr[$keys[10]]);\n if (array_key_exists($keys[11], $arr)) $this->setOperationPrimeMaximumAmount($arr[$keys[11]]);\n }", "public function getCurrencyType()\n {\n return $this->hasOne(CurrencyType::className(), ['id' => 'currency_type_id']);\n }", "private function setType($type)\n\t\t{\n\t\t\tif(is_null($this->type) && is_int($type))\n\t\t\t{\n\t\t\t\t$this->type = $type;\n\t\t\t}\n\t\t\telseif(!is_int($type))\n\t\t\t{\n\t\t\t\tthrow new \\Exception('Statement.setType(): This method only accepts integer values. ' . $type . ' given.');\t\n\t\t\t}\n\t\t}", "public function setRefundLedgerId($value, $key, $type) {\r\n\t\tif ($type == 'single') {\r\n\t\t\t$this->refundLedgerId = $value;\r\n\t\t} else if ($type == 'array') {\r\n\t\t\t$this->refundLedgerId [$key] = $value;\r\n\t\t} else {\r\n\t\t\techo json_encode(array(\"success\" => false, \"message\" => \"Cannot Identifiy Type String Or Array:setRefundLedgerId ?\"));\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "public function setId_recette($id) {\n\n\t\t$id = (int) $id;\n\n \tif ($id>0) {\n\n \t\t$this->_id_recette = $id;\n\n \t}\n\n\t}", "public function saveComponentAssociativeRelationTypeID($typeID): void\n {\n $associativeRelation = $this->getComponentAssociative();\n if ($associativeRelation && $associativeRelation->exists()) {\n $associativeRelation->AssociativeRelationTypeID = $typeID;\n }\n $associativeRelation->write();\n }", "public function set_type($type) {\n $this->update([\n 'type' => $type\n ]);\n\n $this->type = $type;\n\n // finish configuring this OrderExchange\n $this->sync();\n }", "public function setPrimaryKey($key)\n {\n $this->setOpPrimeId($key);\n }", "public function set_type( $type ) {\n\t\t$this->report_type = $type;\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_RECIPIENT_TYPE_KEY, $type );\n\t}", "public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)\n {\n $pos = OperationPrimesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\n $this->setByPosition($pos, $value);\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "public function setType_id($type_id)\n {\n $this->type_id = $type_id;\n\n return $this;\n }", "public function setIdType(string $idType): static;", "function setResponseType($typeInt=5) {\n\t\t$this->lobSub->responseTypeId = $typeInt;\n\t}", "public function SetPreferredCurrency(EcommerceCurrency $currency)\n {\n if ($this->owner->exists()) {\n if ($currency && $currency->exists()) {\n $this->owner->PreferredCurrencyID = $currency->ID;\n $this->owner->write();\n }\n }\n }", "public function setOpId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_id !== $v) {\n $this->op_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_ID;\n }\n\n if ($this->aOperations !== null && $this->aOperations->getOpId() !== $v) {\n $this->aOperations = null;\n }\n\n\n return $this;\n }", "public function setBaseCurrency(SetBaseCurrencyRequest $request)\n {\n $message = $this->exchange_service->updateUserBaseCurrency(\n auth()->user(),\n $request->base_currency\n )->message;\n return Responser::send(200, [], $message);\n }", "public function setIdType($idType)\n {\n $this->idType = $idType;\n\n return $this;\n }" ]
[ "0.6900251", "0.5843858", "0.56379414", "0.515349", "0.49355042", "0.4888926", "0.4834812", "0.4783253", "0.47449628", "0.46492386", "0.4648264", "0.4637516", "0.45783117", "0.45426005", "0.4486766", "0.44685248", "0.4450876", "0.44495705", "0.44354624", "0.43686885", "0.4339969", "0.42990872", "0.42693198", "0.42158294", "0.4206176", "0.41926622", "0.4173605", "0.4172491", "0.41575322", "0.4150592" ]
0.68138164
1
setOperationPrimeProductPricePourcentage() Set the value of [operation_prime_maximum_amount] column.
public function setOperationPrimeMaximumAmount($v) { if ($v === ''){ $v = null; } elseif ($v !== null){ if(is_string($v)){ $v = str_replace( array(' ',','), array('','.'), $v ); } if(is_numeric($v)) { $v = (float) $v; } } if ($this->operation_prime_maximum_amount !== $v) { $this->operation_prime_maximum_amount = $v; $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationPrimeProductPricePourcentage()\n {\n\n return $this->operation_prime_product_price_pourcentage;\n }", "public function setOperationPrimeProductPricePourcentage($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_product_price_pourcentage !== $v) {\n $this->operation_prime_product_price_pourcentage = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE;\n }\n\n\n return $this;\n }", "public function getOperationPrimeMaximumAmount()\n {\n\n return $this->operation_prime_maximum_amount;\n }", "public function setMaxPrice($maxPrice);", "public function setOperationPrimeFixedAmount($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_string($v)){\n $v = str_replace(\n array(' ',','),\n array('','.'),\n $v\n );\n }\n \n if(is_numeric($v)) {\n $v = (float) $v;\n }\n }\n if ($this->operation_prime_fixed_amount !== $v) {\n $this->operation_prime_fixed_amount = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT;\n }\n\n\n return $this;\n }", "public function getOperationPrimeFixedAmount()\n {\n\n return $this->operation_prime_fixed_amount;\n }", "public function setMaxPrice($value)\n {\n return $this->set('MaxPrice', $value);\n }", "public function setMaxPrice($value)\n {\n return $this->set('MaxPrice', $value);\n }", "public function setMaxPrice($value)\n {\n return $this->set('MaxPrice', $value);\n }", "public function setMaxPrice($value) {\n return $this->set(self::MAXPRICE, $value);\n }", "public function setMaxPrice($maxPrice)\n\n {\n $this->maxPrice = $maxPrice;\n\n return $this;\n }", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "public function setProductPrice($product_price){\n $this->product_price = $product_price;\n }", "public function getProductPriceX()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_config/maximum_splits', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "public function setOpPrimeNumero($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_numero !== $v) {\n $this->op_prime_numero = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_NUMERO;\n }\n\n\n return $this;\n }", "public function getProductPriceX()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/maximum_splits');\n }", "public function setOpPrimeLibelle($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->op_prime_libelle !== $v) {\n $this->op_prime_libelle = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE;\n }\n\n\n return $this;\n }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "public function get_max_product_price()\n\t{\n\t\t$this->db->select('MAX(product_selling_price) AS price')->from('product')->where(\"product_status = 1\");\n\t\t$query = $this->db->get();\n\t\t$result = $query->row();\n\t\t\n\t\treturn $result->price;\n\t}", "public function getOpPrimeNumero()\n {\n\n return $this->op_prime_numero;\n }", "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "function setPrice($new_price)\n {\n $this->price = $new_price;\n }", "public function setPesoArea($peso) {\n $this->_peso = $peso; \n }", "function get_price_max_amount( $amount ) {\n\t\treturn $this->price_max;\n\t}", "public function testSetPrime7() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setPrime7(10.092018);\n $this->assertEquals(10.092018, $obj->getPrime7());\n }", "public function setFinalPrice($price)\n {\n $this->_data['final_price'] = $price;\n return $this;\n }", "public function setMaximumValue(int $maximumValue): void;", "public function getMaxPrice()\n\n {\n\n return $this->maxPrice;\n }", "public function testSetPrime10() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setPrime10(10.092018);\n $this->assertEquals(10.092018, $obj->getPrime10());\n }", "public function setPrice($value)\n {\n $this->price = $value;\n $this->recalculate();\n }" ]
[ "0.70905197", "0.6973483", "0.65682626", "0.5927806", "0.5793626", "0.5509157", "0.54604095", "0.54604095", "0.54604095", "0.5455875", "0.5373107", "0.52523375", "0.52031016", "0.51025015", "0.5088597", "0.5012854", "0.5007222", "0.4998971", "0.49829134", "0.4940826", "0.4930492", "0.49091905", "0.4877738", "0.48735315", "0.48567933", "0.4820451", "0.48127615", "0.4800908", "0.4772894", "0.47556457" ]
0.70858216
1
Generic method to set the primary key (op_prime_id column).
public function setPrimaryKey($key) { $this->setOpPrimeId($key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "public function getPrimaryKey()\n {\n return $this->getOpPrimeId();\n }", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setCoParticipante($key);\n\t}", "private function alterPrimaryKey()\n {\n if(is_array($this->primaryKeyValue)){\n // check for auto increment\n $autoIncrement = $this->primaryKeyValue['auto_increment'];\n if($autoIncrement){\n $increment = \" AUTO_INCREMENT, AUTO_INCREMENT=1\";\n }\n\n $this->addCollectionQuery(\n \"\n --\n -- AUTO_INCREMENT for table `{$this->tableName}`\n --\n ALTER TABLE `{$this->tableName}`\n MODIFY {$this->createColumnDefinition($this->primaryKeyValue)}{$increment};\n \"\n );\n }\n }", "public function setPrimaryKey($key)\n {\n $this->setPothnbr($key);\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "function setPrimaryKey($pkey_name){\n\n\t\t$this->pkey = $pkey_name;\n\n\t}", "function setPrimaryKey($inKey) {\n\t\tlist($ID) = explode(self::PRIMARY_KEY_SEPARATOR, $inKey);\n\t\t$this->setID($ID);\n\t}", "function setPrimaryKey($inKey) {\n\t\tlist($ID) = explode(self::PRIMARY_KEY_SEPARATOR, $inKey);\n\t\t$this->setID($ID);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "public function setPrimaryKey($key)\n\t{\n\t\t$this->setCoNumInventario($key);\n\t}", "private function _fetch_table_primary_key()\n {\n if ($this->primary_key == null) {\n $this->primary_key = preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this))) . '_id';\n }\n }", "private function _fetch_table_primary_key()\n {\n if ($this->primary_key == null) {\n $this->primary_key = preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this))) . '_id';\n }\n }", "public function setOpId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_id !== $v) {\n $this->op_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_ID;\n }\n\n if ($this->aOperations !== null && $this->aOperations->getOpId() !== $v) {\n $this->aOperations = null;\n }\n\n\n return $this;\n }", "public function setPrimaryKey($key)\n {\n $this->setProdId($key);\n }", "public function setPrimaryKey($key) {\n $this->primaryKey = $key;\n }", "public function setPrimaryKey($key)\n {\n $this->setSekolahId($key);\n }", "public function setPrimaryKey($key)\n {\n $this->setid($key);\n }", "public function setPrimaryKey($key)\n {\n $this->setId($key);\n }", "public function setPrimaryKey($key)\n {\n $this->setId($key);\n }", "public function setPrimaryKey($key)\n {\n $this->setId($key);\n }", "public function setPrimaryKey($key)\n {\n $this->setId($key);\n }", "public function setPrimaryKey($key)\n {\n $this->setId($key);\n }" ]
[ "0.6875452", "0.6530969", "0.64509064", "0.64460796", "0.63987476", "0.63456076", "0.62977344", "0.6285413", "0.6285413", "0.6252991", "0.6252991", "0.6252991", "0.6252991", "0.6252991", "0.6252991", "0.6252991", "0.6252991", "0.6252182", "0.62244624", "0.62244624", "0.621682", "0.62142813", "0.6176768", "0.61588657", "0.6130517", "0.61304337", "0.61304337", "0.61304337", "0.61304337", "0.61304337" ]
0.7266264
0
Declares an association between this object and a RRewardTypes object.
public function setRRewardTypes(RRewardTypes $v = null) { if ($v === null) { $this->setOperationPrimeRRewardTypeId(NULL); } else { $this->setOperationPrimeRRewardTypeId($v->getRRewardTypeId()); } $this->aRRewardTypes = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the RRewardTypes object, it will not be re-added. if ($v !== null) { $v->addOperationPrimes($this); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRealestateType()\n {\n return $this->hasOne(RealEstateType::className(), ['id' => 'realestate_type_id']);\n }", "public function setOperationPrimeRRewardTypeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_type_id !== $v) {\n $this->operation_prime_r_reward_type_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID;\n }\n\n if ($this->aRRewardTypes !== null && $this->aRRewardTypes->getRRewardTypeId() !== $v) {\n $this->aRRewardTypes = null;\n }\n\n\n return $this;\n }", "public static function register_type() {\n\t\tregister_graphql_enum_type(\n\t\t\t'RelationEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The logical relation between each item in the array when there are more than one.', 'wp-graphql' ),\n\t\t\t\t'values' => [\n\t\t\t\t\t'AND' => [\n\t\t\t\t\t\t'name' => 'AND',\n\t\t\t\t\t\t'value' => 'AND',\n\t\t\t\t\t],\n\t\t\t\t\t'OR' => [\n\t\t\t\t\t\t'name' => 'OR',\n\t\t\t\t\t\t'value' => 'OR',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}", "public function relationship($class, $type, $name, array $options = [])\n {\n }", "public function setType(RecommendationTypeInterface $type);", "public function setAwardType($value)\n {\n return $this->set('AwardType', $value);\n }", "function eZEnhancedObjectRelationType()\n {\n $this->eZDataType( EZ_DATATYPESTRING_ENHANCED_OBJECT_RELATION, ezi18n( 'kernel/classes/datatypes', \"Enhanced Object relation\", 'Datatype name' ),\n array( 'serialize_supported' => true ) );\n }", "public function CreateRelationship($type = self::RT_OFFICE_DOCUMENT, $target = 'document.xml') {\n\t\t$el = $this->createElement('Relationship');\n\t\t$this->_Relationships[] = $el;\n\t\t$el->setAttribute('Id', \"rId\".count($this->_Relationships));\n\t\t$el->setIdAttribute('Id', true);\n\t\t$el->setAttribute('Type', $type);\n\t\t$el->setAttribute('Target', $target);\n\t\t$this->_DocumentRoot->appendChild($el);\n\t}", "public function initialize()\n {\n $this->setSource('custom_fields_types');\n\n $this->hasMany(\n 'id',\n 'Canvas\\Models\\CustomFieldsTypesSettings',\n 'custom_fields_types_id',\n ['alias' => 'typesSetting']\n );\n }", "public function setResourceRelationshipType($resourceRelationshipType)\n {\n $this->resourceRelationshipType = $resourceRelationshipType;\n return $this;\n }", "public function getType0()\n {\n return $this->hasOne(TypeRate::class, ['id' => 'type'])->inverseOf('rates');\n }", "public function getOperationPrimeRRewardTypeId()\n {\n\n return $this->operation_prime_r_reward_type_id;\n }", "public function type()\n {\n \t//return $this->belongsTo(Genre::class, 'foreing_key', 'id');\n \treturn $this->belongsTo(Type::class);\n }", "public function addType($type);", "public function setRecurrenceRegeneratedType($recurrenceRegeneratedType)\n {\n $this->recurrenceRegeneratedType = $recurrenceRegeneratedType;\n return $this;\n }", "public function bookable(): MorphTo\n {\n return $this->morphTo('bookable', 'bookable_type', 'bookable_id', 'id');\n }", "public function initialize()\n {\n // attributes\n $this->setName('r_user_types');\n $this->setPhpName('RUserTypes');\n $this->setClassname('RUserTypes');\n $this->setPackage('phoenix');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('r_user_type_id', 'RUserTypeId', 'INTEGER', true, 4, null);\n $this->addColumn('r_user_type_short_name', 'RUserTypeShortName', 'VARCHAR', true, 5, null);\n $this->addColumn('r_user_type_full_name', 'RUserTypeFullName', 'VARCHAR', false, 60, null);\n $this->addColumn('r_user_type_actif', 'RUserTypeActif', 'TINYINT', true, 1, 1);\n // validators\n $this->addValidator('r_user_type_short_name', 'maxLength', 'propel.validator.MaxLengthValidator', '5', 'Le champ r_user_type_short_name ne doit pas dépasser 5 caractères.');\n $this->addValidator('r_user_type_short_name', 'type', 'propel.validator.TypeValidator', 'string', 'Le champ r_user_type_short_name doit être un string.');\n $this->addValidator('r_user_type_full_name', 'maxLength', 'propel.validator.MaxLengthValidator', '60', 'Le champ r_user_type_full_name ne doit pas dépasser 60 caractères.');\n $this->addValidator('r_user_type_full_name', 'type', 'propel.validator.TypeValidator', 'string', 'Le champ r_user_type_full_name doit être un string.');\n $this->addValidator('r_user_type_actif', 'type', 'propel.validator.TypeValidator', 'int', 'Le champ r_user_type_actif doit être un int.');\n }", "public function addType($type) {\n $this->type[] = $type;\n return $this;\n }", "public function AddType($type) {\n $this->Types[] = $type;\n }", "public function setup_types()\n {\n }", "public function setRemediationType($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Cloud\\AssuredWorkloads\\V1\\Violation\\Remediation\\RemediationType::class);\n $this->remediation_type = $var;\n\n return $this;\n }", "public function save() {\n if ($this->isNew()) {\n $this->xpdo->log(MODx::LOG_LEVEL_INFO,'Creating default RegType');\n $regtype = $this->xpdo->newObject('RSVPMeRegType');\n $regtype->fromArray(array(\n 'name' => 'default',\n 'description' => 'default registration type',\n 'code' => (isset($this->code)) ? $this->code : '',\n 'fee' => (isset($this->fee)) ? $this->fee : '',\n ));\n\n $this->addMany($regtype);\n }\n\n /**\n * For now, only 1 registration type is allowed, so we will automatically\n * set the end date to the same as the date of the event. It will be set\n * independently in a future release.\n */\n if (!$this->isNew() && $this->isDirty('date')) {\n $regtypes = $this->getMany('RegistrationType');\n $regtype = array_pop($regtypes);\n $regtype->set('end',$this->get('date'));\n }\n\n /**\n * Since Registration Types will only be editable in a later version,\n * we need to make sure the 'secret code' stays synced\n */\n if (!$this->isNew() && (isset($this->code) || isset($this->fee))) {\n $regtypes = $this->getMany('RegistrationType');\n $regtype = array_pop($regtypes);\n\n if (isset($this->code)) {\n $regtype->set('code',$this->code);\n }\n if (isset($this->fee)) {\n $regtype->set('fee',$this->fee);\n }\n }\n\n /* now we can finish saving, this will also save related objects */\n return parent :: save();\n }", "function roomify_conversations_add_unit_type_reference_field() {\n field_info_cache_clear();\n\n // \"conversation_unit_type_ref\" field.\n if (field_read_field('conversation_unit_type_ref') === FALSE) {\n $field = array(\n 'field_name' => 'conversation_unit_type_ref',\n 'type' => 'entityreference',\n 'cardinality' => 1,\n 'locked' => 1,\n 'settings' => array(\n 'target_type' => 'bat_type',\n ),\n );\n field_create_field($field);\n }\n\n // \"conversation_unit_type_ref\" field instance.\n if (field_read_instance('roomify_conversation', 'conversation_unit_type_ref', 'standard') === FALSE) {\n $instance = array(\n 'field_name' => 'conversation_unit_type_ref',\n 'entity_type' => 'roomify_conversation',\n 'label' => 'Unit type',\n 'bundle' => 'standard',\n 'required' => FALSE,\n 'widget' => array(\n 'type' => 'entityreference_autocomplete',\n ),\n );\n field_create_instance($instance);\n }\n}", "public function type()\n {\n return $this->hasOne('App\\Type', 'question_type');\n }", "public function cardType(): BelongsTo\n {\n return $this->belongsTo(CardType::class);\n }", "public function setDefaultTypeData(){\n if(\n is_object($this->source) &&\n is_object($this->target)\n ){\n if(\n $this->source->isAbyss() ||\n $this->target->isAbyss()\n ){\n $this->scope = 'abyssal';\n $this->type = ['abyssal'];\n }else{\n $routeController = new Route();\n $route = $routeController->searchRoute($this->source->systemId, $this->target->systemId, 1);\n\n if($route['routePossible']){\n $this->scope = 'stargate';\n $this->type = ['stargate'];\n }else{\n $this->scope = 'wh';\n $this->type = ['wh_fresh'];\n }\n }\n }\n }", "function register_aliment_brand_relationship() {\n\t\\IA\\One_To_Many_Post_Relationship::register_relationship( 'ia_aliment_brand', 'company', 'post' );\n}", "public function getRelated()\n {\n return new $this->morphType();\n }", "public static function getPointsRewardTypes()\n {\n return [\n self::REWARD_TYPE_POINTS,\n self::REWARD_TYPE_RANDOM_AMOUNT_OF_POINTS,\n ];\n }", "public function equip_type()\n {\n return $this->hasOne(ReferenceProperty::class, 'id', 'equip_type_reference_id');\n }" ]
[ "0.5562362", "0.55607593", "0.49305105", "0.49097145", "0.4901901", "0.48768172", "0.48591948", "0.4843987", "0.480192", "0.4762195", "0.47506163", "0.47490352", "0.47106567", "0.46753082", "0.466561", "0.45896822", "0.4582585", "0.4569983", "0.45372713", "0.45235735", "0.4521521", "0.45082894", "0.44810206", "0.44806823", "0.447957", "0.4470043", "0.4469938", "0.44693863", "0.44598", "0.4440189" ]
0.6618223
0
Get the associated RRewardTypes object
public function getRRewardTypes(PropelPDO $con = null, $doQuery = true) { if ($this->aRRewardTypes === null && ($this->operation_prime_r_reward_type_id !== null) && $doQuery) { $this->aRRewardTypes = RRewardTypesQuery::create()->findPk($this->operation_prime_r_reward_type_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aRRewardTypes->addOperationPrimess($this); */ } return $this->aRRewardTypes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getPointsRewardTypes()\n {\n return [\n self::REWARD_TYPE_POINTS,\n self::REWARD_TYPE_RANDOM_AMOUNT_OF_POINTS,\n ];\n }", "public function getRealestateType()\n {\n return $this->hasOne(RealEstateType::className(), ['id' => 'realestate_type_id']);\n }", "public function getReward()\n {\n return $this->get(self::_REWARD);\n }", "public function getReward()\n {\n return $this->get(self::_REWARD);\n }", "public function getReward()\n {\n return $this->get(self::_REWARD);\n }", "public function getOperationPrimeRRewardTypeId()\n {\n\n return $this->operation_prime_r_reward_type_id;\n }", "public function setRRewardTypes(RRewardTypes $v = null)\n {\n if ($v === null) {\n $this->setOperationPrimeRRewardTypeId(NULL);\n } else {\n $this->setOperationPrimeRRewardTypeId($v->getRRewardTypeId());\n }\n\n $this->aRRewardTypes = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the RRewardTypes object, it will not be re-added.\n if ($v !== null) {\n $v->addOperationPrimes($this);\n }\n\n\n return $this;\n }", "public function getTypesOfPayersForRedeliveryAction(array $options = []): Model;", "public function getHireReward()\n {\n return $this->get(self::_HIRE_REWARD);\n }", "public function getBestRankReward()\n {\n return $this->get(self::_BEST_RANK_REWARD);\n }", "public function getType0()\n {\n return $this->hasOne(TypeRate::class, ['id' => 'type'])->inverseOf('rates');\n }", "public function getDrawRankReward()\n {\n return $this->get(self::_DRAW_RANK_REWARD);\n }", "public function getResistance()\n {\n $xary = array();\n foreach ($this->resistance as $info) {\n $xary[] = new Type($info->resource_id);\n }\n return $xary;\n }", "public function getTypesOfPayersAction(array $options = []): Model;", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "protected function getTypes() {}", "public static function getRewardsTranslations($rewardType = null)\n {\n $module = Module::getInstanceByName('gamifications');\n\n $translations = [\n self::REWARD_TYPE_POINTS => $module->l('Fixed points', __CLASS__),\n self::REWARD_TYPE_DISCOUNT => $module->l('Discount', __CLASS__),\n self::REWARD_TYPE_FREE_SHIPPING => $module->l('Free shipping', __CLASS__),\n self::REWARD_TYPE_GIFT => $module->l('Gift', __CLASS__),\n self::REWARD_TYPE_RANDOM_AMOUNT_OF_POINTS => $module->l('Random amount of points', __CLASS__),\n ];\n\n return (null === $rewardType) ? $translations : $translations[$rewardType];\n }", "public function RateType()\n {\n return [\n 'erate' => 'Electronic Rate',\n 'tt' => 'Telegrafic Transfer',\n 'tc' => 'Travellers Cheque',\n 'bn' => 'Bank Notes',\n ];\n }", "function get_related_to_types()\n{\n $types = [\n [\n 'key' => 'general_call',\n 'lang_key' => 'General Call'\n ],\n [\n 'key' => 'cold_calling',\n 'lang_key' => 'Cold Calling'\n ],\n [\n 'key' => 'satisfaction_call',\n 'lang_key' => 'Satisfaction Call'\n ],\n [\n 'key' => 'review_call',\n 'lang_key' => 'Review Call'\n ],\n [\n 'key' => 'referral_call',\n 'lang_key' => 'Referral Call'\n ],\n [\n 'key' => 'proposal',\n 'lang_key' => 'Proposal - Related'\n ],\n [\n 'key' => 'estimate',\n 'lang_key' => 'Estimate - Related'\n ],\n ];\n\n return hooks()->apply_filters('get_related_to_types', $types);\n}", "public function getRewardCategories()\r\n {\r\n return Controllers\\RewardCategories::getInstance();\r\n }", "public function getCargoTypesAction(array $options = []): Model;", "public function getDrawReward()\n {\n return $this->get(self::_DRAW_REWARD);\n }", "public function get_desired_types();", "function list_revenue_type() \n\t\t{\n\t\t\t\n\t\t\t$this->db->order_by('revenue_type_value','ASC');\n\t\t\t\n\t\t\t$query\t\t\t\t\t=\t\t$this->db->get($this->table_name);\n\t\t\t\n\t\t\treturn $query->result();\n\t\t\t\n\t\t}", "public function reward(): Collection\n {\n return $this->get('api/blocks/getReward');\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }" ]
[ "0.62957644", "0.6129088", "0.6125551", "0.6125551", "0.6125551", "0.60111535", "0.5761432", "0.564249", "0.55206215", "0.545008", "0.5416678", "0.53433645", "0.53194183", "0.53014135", "0.528504", "0.528504", "0.528504", "0.528504", "0.5233182", "0.5221547", "0.5192538", "0.51689446", "0.5144767", "0.5143796", "0.51264334", "0.5118873", "0.5109296", "0.51024354", "0.50977695", "0.50977695" ]
0.6171596
1
Declares an association between this object and a RRewardExpeditionModes object.
public function setRRewardExpeditionModes(RRewardExpeditionModes $v = null) { if ($v === null) { $this->setOperationPrimeRRewardExpeditionModeId(NULL); } else { $this->setOperationPrimeRRewardExpeditionModeId($v->getRRewardExpeditionModeId()); } $this->aRRewardExpeditionModes = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the RRewardExpeditionModes object, it will not be re-added. if ($v !== null) { $v->addOperationPrimes($this); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOperationPrimeRRewardExpeditionModeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_expedition_mode_id !== $v) {\n $this->operation_prime_r_reward_expedition_mode_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID;\n }\n\n if ($this->aRRewardExpeditionModes !== null && $this->aRRewardExpeditionModes->getRRewardExpeditionModeId() !== $v) {\n $this->aRRewardExpeditionModes = null;\n }\n\n\n return $this;\n }", "public function getOperationPrimeRRewardExpeditionModeId()\n {\n\n return $this->operation_prime_r_reward_expedition_mode_id;\n }", "public function getRRewardExpeditionModes(PropelPDO $con = null, $doQuery = true)\n {\n if ($this->aRRewardExpeditionModes === null && ($this->operation_prime_r_reward_expedition_mode_id !== null) && $doQuery) {\n $this->aRRewardExpeditionModes = RRewardExpeditionModesQuery::create()->findPk($this->operation_prime_r_reward_expedition_mode_id, $con);\n /* The following can be used additionally to\n guarantee the related object contains a reference\n to this object. This level of coupling may, however, be\n undesirable since it could result in an only partially populated collection\n in the referenced object.\n $this->aRRewardExpeditionModes->addOperationPrimess($this);\n */\n }\n\n return $this->aRRewardExpeditionModes;\n }", "public function __construct(Expedition $expedition)\n {\n $this->expedition = $expedition;\n }", "public function getMode()\n {\n return $this->hasOne(MsMode::className(), ['id' => 'mode_id']);\n }", "public function setModeReglement($modeReglement) {\n $this->modeReglement = $modeReglement;\n return $this;\n }", "function setInvitationMode($invitation_mode = 0) \n\t{\n\t\t$this->invitation_mode = $invitation_mode;\n }", "public function setRRewardTypes(RRewardTypes $v = null)\n {\n if ($v === null) {\n $this->setOperationPrimeRRewardTypeId(NULL);\n } else {\n $this->setOperationPrimeRRewardTypeId($v->getRRewardTypeId());\n }\n\n $this->aRRewardTypes = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the RRewardTypes object, it will not be re-added.\n if ($v !== null) {\n $v->addOperationPrimes($this);\n }\n\n\n return $this;\n }", "function setInvitationAndMode($invitation = 0, $invitation_mode = 0)\n\t{\n\t\t$this->invitation_mode = $invitation_mode;\n\t\t$this->setInvitation($invitation);\n\t}", "private function setModes(){\n\t\t\t\n\t\t\t$this->query_modes = array(\t\"version\"\t\t\t=> \"getVersion\",\n\t\t\t\t\t\t\t\t\t\t\"synsid_by_word\"\t=> \"getSynsetIds\",\n\t\t\t\t\t\t\t\t\t\t\"synset_by_id\"\t\t=> \"getSynset\",\n\t\t\t\t\t\t\t\t\t\t\"sense_by_word\"\t\t=> \"getSenses\",\n\t\t\t\t\t\t\t\t\t\t\"synsid_by_resid\"\t=> \"getSynsetIdsFromResourceID\",\n\t\t\t\t\t\t\t\t\t\t\"edge_by_synsid\"\t=> \"getEdges\"\n\t\t\t\t\t\t\t\t\t);\n\t\t}", "public function setMode(array $options)\n {\n $this->soap(\"AVTransport\", \"SetPlayMode\", [\n \"NewPlayMode\" => Helper::setMode($options),\n ]);\n\n return $this;\n }", "public function modes()\n\t{\n\t\t// belongsTo(RelatedModel, foreignKey = mode_id, keyOnRelatedModel = id)\n\t\treturn $this->belongsTo(Mode::class);\n\t}", "public function editionMode() {\n\t\tif (isset($_SESSION[\"FINE_MESSAGE_EDITION_MODE\"])) {\n\t\t\t$this->isMessageEditionMode = true;\n\t\t}\n\t\t$this->content->addFile('../utils.i18n.fine/src/views/enableDisableEdition.php', $this);\n\t\t$this->template->toHtml();\n\t}", "public function setDefinition(LoyaltyProgramRewardDefinition $definition): void\n {\n $this->definition = $definition;\n }", "public function setReward(Down_ExcavateReward $value)\n {\n return $this->set(self::_REWARD, $value);\n }", "public function setReward(Down_ExcavateReward $value)\n {\n return $this->set(self::_REWARD, $value);\n }", "public function setRemediation($var)\n {\n GPBUtil::checkString($var, True);\n $this->remediation = $var;\n\n return $this;\n }", "public function editions()\n {\n return $this->belongsToMany('WhereYouLeftOff\\Edition');\n }", "public function setBlendMode($blendMode) {}", "public function setOperationPrimeRRewardTypeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_type_id !== $v) {\n $this->operation_prime_r_reward_type_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID;\n }\n\n if ($this->aRRewardTypes !== null && $this->aRRewardTypes->getRRewardTypeId() !== $v) {\n $this->aRRewardTypes = null;\n }\n\n\n return $this;\n }", "public function declineMentorshipSession($mentorshipSessionId, $role, $id, $email) {\n $statusToSet = -1;\n $invitedPerson = null;\n $mentorshipSession = $this->getMentorshipSession($mentorshipSessionId);\n if($role === 'mentee') {\n $invitedPerson = $mentorshipSession->mentee;\n // set to cancelled by mentee if mentor has accepted or not responded yet\n if(in_array($mentorshipSession->status_id, [2, 4]) !== false)\n $statusToSet = 12;\n } else if($role === 'mentor') {\n $invitedPerson = $mentorshipSession->mentor;\n // set to cancelled by mentor if mentee has accepted or not responded yet\n if(in_array($mentorshipSession->status_id, [2, 3]) !== false)\n $statusToSet = 13;\n }\n if($statusToSet !== -1 && $invitedPerson->id == $id && $invitedPerson->email === $email) {\n $this->editMentorshipSession([\n 'status_id' => $statusToSet, 'mentorship_session_id' => $mentorshipSessionId\n ]);\n // if session is cancelled by mentee make available only the mentor and set the mentee's status to rejected,\n // else if session is cancelled by mentor make the mentor unavailable\n // else make both available\n if($statusToSet === 12) {\n $this->setMentorshipSessionMentorStatusToAvailable($mentorshipSession->mentor->id);\n $this->setMentorshipSessionMenteeStatusToRejected($mentorshipSession->mentee->id);\n } else if($statusToSet === 13) {\n $this->setMentorshipSessionMentorStatusToNotAvailable($mentorshipSession->mentor->id);\n $this->setMentorshipSessionMenteeStatusToAvailable($mentorshipSession->mentee->id);\n } else { // TODO: this was created when the account manager could decline to manage a match (maybe we do not need it anymore)\n $this->setMentorshipSessionMentorAndMenteeStatusesToAvailable(\n $mentorshipSession->mentor->id, $mentorshipSession->mentee->id\n );\n }\n return true;\n } else {\n return false;\n }\n }", "private function setModes(){\n\t\t\t\n\t\t\t$this->query_modes = array(\t\"detect\"\t\t\t=> \"Detect\",\n\t\t\t\t\t\t\t\t\t\t\"translate\"\t\t\t=> \"Translate\",\n\t\t\t\t\t\t\t\t\t\t\"languages\"\t\t\t=> \"getLanguagesForTranslations\",\n\t\t\t\t\t\t\t\t\t\t\"translates\"\t\t=> \"GetTranslations\"\n\t\t\t\t\t\t\t\t\t);\n\t\t}", "function _exp_mode($mode=NULL){\n $mode = 'exp_' . nz($mode,$this->exp_mode_default);\n return method_exists($this,$mode)?$mode:FALSE;\n }", "public function testComAdobeCqSocialEnablementResourceEndpointsImplEnablementResou()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.enablement.resource.endpoints.impl.EnablementResourceModelOperationService';\n\n $crawler = $client->request('POST', $path);\n }", "function setMode($mode) {\n\t\t$this->_mode = $mode;\n\t}", "function setMode($mode) {\n\t\t$this->_mode = $mode;\n\t}", "public function religion()\n {\n return $this->hasOne(Religion::class , 'id' , 'religions_id');\n }", "function eZEnhancedObjectRelationType()\n {\n $this->eZDataType( EZ_DATATYPESTRING_ENHANCED_OBJECT_RELATION, ezi18n( 'kernel/classes/datatypes', \"Enhanced Object relation\", 'Datatype name' ),\n array( 'serialize_supported' => true ) );\n }", "public function getRealestateType()\n {\n return $this->hasOne(RealEstateType::className(), ['id' => 'realestate_type_id']);\n }", "public function setOptionalMode($var)\n {\n GPBUtil::checkString($var, True);\n $this->optional_mode = $var;\n\n return $this;\n }" ]
[ "0.599741", "0.5618633", "0.4911883", "0.4834147", "0.4806142", "0.4684537", "0.4624924", "0.4554939", "0.45481062", "0.4432999", "0.44015458", "0.43724847", "0.43066055", "0.42781222", "0.4174686", "0.4174686", "0.4148976", "0.41225937", "0.4112767", "0.4111509", "0.41092896", "0.40763852", "0.40462118", "0.40413436", "0.40393165", "0.40393165", "0.40358368", "0.4021645", "0.40149587", "0.40001267" ]
0.7004069
0
Get the associated RRewardExpeditionModes object
public function getRRewardExpeditionModes(PropelPDO $con = null, $doQuery = true) { if ($this->aRRewardExpeditionModes === null && ($this->operation_prime_r_reward_expedition_mode_id !== null) && $doQuery) { $this->aRRewardExpeditionModes = RRewardExpeditionModesQuery::create()->findPk($this->operation_prime_r_reward_expedition_mode_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aRRewardExpeditionModes->addOperationPrimess($this); */ } return $this->aRRewardExpeditionModes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationPrimeRRewardExpeditionModeId()\n {\n\n return $this->operation_prime_r_reward_expedition_mode_id;\n }", "public function setRRewardExpeditionModes(RRewardExpeditionModes $v = null)\n {\n if ($v === null) {\n $this->setOperationPrimeRRewardExpeditionModeId(NULL);\n } else {\n $this->setOperationPrimeRRewardExpeditionModeId($v->getRRewardExpeditionModeId());\n }\n\n $this->aRRewardExpeditionModes = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the RRewardExpeditionModes object, it will not be re-added.\n if ($v !== null) {\n $v->addOperationPrimes($this);\n }\n\n\n return $this;\n }", "public function getMode()\n {\n return $this->hasOne(MsMode::className(), ['id' => 'mode_id']);\n }", "public function getReward()\n {\n return $this->get(self::_REWARD);\n }", "public function getReward()\n {\n return $this->get(self::_REWARD);\n }", "public function getReward()\n {\n return $this->get(self::_REWARD);\n }", "public function getMode();", "public function getMode();", "public function getMode();", "public function getMode();", "public function getModeReglement() {\n return $this->modeReglement;\n }", "public static function getMode();", "public function getModes(): array\n {\n return $this->modes;\n }", "public function getInventoryMode();", "public function getMode()\n {\n return;\n }", "public function getActivityReward()\n {\n return $this->get(self::_ACTIVITY_REWARD);\n }", "function getMode() {\n\t\treturn $this->get('mode');\n\t}", "public function getBestRankReward()\n {\n return $this->get(self::_BEST_RANK_REWARD);\n }", "public function getMode()\n {\n return $this->_mode;\n }", "function getMode() {\n\t\treturn $this->_mode;\n\t}", "function getMode() {\n\t\treturn $this->_mode;\n\t}", "function getMode()\n {\n return $this->mode;\n }", "public function getDrawReward()\n {\n return $this->get(self::_DRAW_REWARD);\n }", "function getMode()\n {\n return $this->mode;\n }", "public function getMode() {\n return $this->mode;\n }", "public function setOperationPrimeRRewardExpeditionModeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_expedition_mode_id !== $v) {\n $this->operation_prime_r_reward_expedition_mode_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID;\n }\n\n if ($this->aRRewardExpeditionModes !== null && $this->aRRewardExpeditionModes->getRRewardExpeditionModeId() !== $v) {\n $this->aRRewardExpeditionModes = null;\n }\n\n\n return $this;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }", "public function getMode()\n {\n return $this->mode;\n }" ]
[ "0.6757832", "0.6561228", "0.6016944", "0.57439864", "0.57439864", "0.57439864", "0.57268476", "0.57268476", "0.57268476", "0.57268476", "0.5724368", "0.5605156", "0.54886466", "0.543859", "0.5437733", "0.54111093", "0.5393894", "0.53462046", "0.53293234", "0.5308534", "0.5308534", "0.53034204", "0.528944", "0.52704275", "0.5251732", "0.5250504", "0.5235911", "0.5235911", "0.5235911", "0.5235911" ]
0.66699624
1
Declares an association between this object and a RRewardTransporters object.
public function setRRewardTransporters(RRewardTransporters $v = null) { if ($v === null) { $this->setOperationPrimeRRewardTransporterId(NULL); } else { $this->setOperationPrimeRRewardTransporterId($v->getRRewardTransporterId()); } $this->aRRewardTransporters = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the RRewardTransporters object, it will not be re-added. if ($v !== null) { $v->addOperationPrimes($this); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTransportReff()\n {\n return $this->hasOne(MsRefference::className(), ['id' => 'transport_reff_id']);\n }", "public function trainer()\n {\n return $this->hasOne('App\\Models\\Trainer');\n }", "public function setOperationPrimeRRewardTransporterId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_r_reward_transporter_id !== $v) {\n $this->operation_prime_r_reward_transporter_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID;\n }\n\n if ($this->aRRewardTransporters !== null && $this->aRRewardTransporters->getRRewardTransporterId() !== $v) {\n $this->aRRewardTransporters = null;\n }\n\n\n return $this;\n }", "public function performers() {\n return $this->hasMany('Rockit\\Models\\Performer')\n ->orderBy('order');\n }", "public function trader_partners () {\n //return $this->hasMany('App\\TraderPartner');\n return $this->hasMany('App\\TraderPartner', 'trader_id');\n // return $this->hasMany(TraderPartner::class);\n }", "public function trainer()\n\t{\n\t\treturn $this->belongsTo('App\\User', 'trainer_uuid', 'uuid');\n\t}", "public function dealers()\n {\n return $this->hasMany('App\\Models\\Dealer');\n }", "public function trailers()\n {\n return $this->hasMany('App\\Trailer');\n }", "public function getOperationPrimeRRewardTransporterId()\n {\n\n return $this->operation_prime_r_reward_transporter_id;\n }", "public function senders()\n {\n return $this->belongsToMany('App\\Sender');\n }", "public function wrestler()\n {\n return $this->hasOne('Efed\\Models\\Wrestler', 'id', 'wrestler_id');\n }", "public function getCarierReff()\n {\n return $this->hasOne(MsRefference::className(), ['id' => 'carier_reff_id']);\n }", "public function adopter()\n {\n return $this->belongsTo('App\\Person', 'adopter_id');\n }", "public function dealer()\n {\n return $this->belongsTo('App\\Dealer');\n }", "public function setAgents() {\n foreach ($this->rAgents as $value) {\n $this->agent[$value->id] = $value->id;\n }\n }", "public function setErors($erors)\n {\n $this->erors = $erors;\n\n return $this;\n }", "public function transporter() {\n if(is_null($this->transporter)){\n $this->transporter = Transporter::getByIdentifier($this->transporter_id);\n }\n return $this->transporter;\n }", "public function setRRewardTypes(RRewardTypes $v = null)\n {\n if ($v === null) {\n $this->setOperationPrimeRRewardTypeId(NULL);\n } else {\n $this->setOperationPrimeRRewardTypeId($v->getRRewardTypeId());\n }\n\n $this->aRRewardTypes = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the RRewardTypes object, it will not be re-added.\n if ($v !== null) {\n $v->addOperationPrimes($this);\n }\n\n\n return $this;\n }", "public function RosterRelation()\n {\n return $this->professional->roster;\n }", "public function restaurant()\n {\n return $this->belongsTo('App\\Models\\Restaurant');\n }", "public function subscriberPremium()\n\t{\n\t\treturn $this->hasOne('App\\SubscriberPremium');\n\t}", "public function teachers()\n {\n return $this->hasMany('App\\Models\\Person');\n }", "public function receiver()\n\t{\n\t\treturn $this->belongsTo('\\User');\n\t}", "public function setRecruter($recruter)\n {\n $this->recruter = $recruter;\n\n return $this;\n }", "public function receiverPerson()\r\n {\r\n // belongsTo(RelatedModel, foreignKey = user_id, keyOnRelatedModel = id)\r\n return $this->belongsTo(User::class,'receiver_id');\r\n }", "public function seller()\n {\n return $this->morphTo(__FUNCTION__, 'seller_type', 'seller_id');\n }", "public function setReceivers($receivers)\n {\n $this->receivers = Type::forceAndReturn($receivers, ArrayAccess::class);\n return $this;\n }", "public function distributors()\n {\n return $this->belongsTo('App\\Distributor', 'distributor_id');\n }", "public function receiver() {\n return $this->belongsTo(User::class, 'receiver_id');\n }", "public function receiver()\n {\n return $this->belongsTo(User::class, 'receiver_id');\n }" ]
[ "0.5896614", "0.5728776", "0.571786", "0.5373154", "0.5350214", "0.5274701", "0.50467205", "0.5030582", "0.49982965", "0.49600393", "0.49323332", "0.4928343", "0.49009565", "0.4899642", "0.4886878", "0.48790926", "0.4867794", "0.4830812", "0.48303097", "0.4789412", "0.4761225", "0.4756395", "0.47559077", "0.47420073", "0.4713324", "0.47103825", "0.47067273", "0.4700261", "0.4695071", "0.4692703" ]
0.7208917
0
Clears out the collOperationPrestationss collection This does not modify the database; however, it will remove any associated objects, causing them to be refetched by subsequent calls to accessor method.
public function clearOperationPrestationss() { $this->collOperationPrestationss = null; // important to set this to null since that means it is uninitialized $this->collOperationPrestationssPartial = null; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearOperationScenariis()\n {\n $this->collOperationScenariis = null; // important to set this to null since that means it is uninitialized\n $this->collOperationScenariisPartial = null;\n\n return $this;\n }", "public function clear()\n {\n $this->op_prime_id = null;\n $this->op_id = null;\n $this->op_prime_libelle = null;\n $this->op_prime_numero = null;\n $this->gdl_art_id = null;\n $this->operation_prime_currency_id = null;\n $this->operation_prime_r_reward_type_id = null;\n $this->operation_prime_r_reward_expedition_mode_id = null;\n $this->operation_prime_r_reward_transporter_id = null;\n $this->operation_prime_fixed_amount = null;\n $this->operation_prime_product_price_pourcentage = null;\n $this->operation_prime_maximum_amount = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function setOperationPrestationss(PropelCollection $operationPrestationss, PropelPDO $con = null)\n {\n $operationPrestationssToDelete = $this->getOperationPrestationss(new Criteria(), $con)->diff($operationPrestationss);\n\n\n $this->operationPrestationssScheduledForDeletion = $operationPrestationssToDelete;\n\n foreach ($operationPrestationssToDelete as $operationPrestationsRemoved) {\n $operationPrestationsRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationPrestationss = null;\n foreach ($operationPrestationss as $operationPrestations) {\n $this->addOperationPrestations($operationPrestations);\n }\n\n $this->collOperationPrestationss = $operationPrestationss;\n $this->collOperationPrestationssPartial = false;\n\n return $this;\n }", "public function clearPesquisas()\n\t{\n\t\t$this->collPesquisas = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearColetaPesquisas()\n\t{\n\t\t$this->collColetaPesquisas = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clear()\n {\n $this->idmontacargas = null;\n $this->idsucursal = null;\n $this->montacargas_modelo = null;\n $this->montacargas_marca = null;\n $this->montacargas_c = null;\n $this->montacargas_k = null;\n $this->montacargas_p = null;\n $this->montacargas_t = null;\n $this->montacargas_e = null;\n $this->montacargas_volts = null;\n $this->montacargas_amperaje = null;\n $this->montacargas_nombre = null;\n $this->montacargas_numserie = null;\n $this->montacargas_comprador = null;\n $this->montacargas_ciclosmant = null;\n $this->montacargas_ciclosiniciales = null;\n $this->montacargas_baja = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clear()\n {\n if (null !== $this->aPurchaseOrder) {\n $this->aPurchaseOrder->removePoReceivingHead($this);\n }\n if (null !== $this->aWarehouse) {\n $this->aWarehouse->removePoReceivingHead($this);\n }\n $this->pothnbr = null;\n $this->pothstat = null;\n $this->pothrcptdate = null;\n $this->intbwhse = null;\n $this->pothglpd = null;\n $this->pothairship = null;\n $this->potherinreview = null;\n $this->pothexchctry = null;\n $this->pothexchrate = null;\n $this->intbwhseorig = null;\n $this->pothlandcost = null;\n $this->pothrcptnbr = null;\n $this->pothlandbasedon = null;\n $this->pothinvcnbr = null;\n $this->pothinvcdate = null;\n $this->pothfrtamt = null;\n $this->pothmiscamt = null;\n $this->dateupdtd = null;\n $this->timeupdtd = null;\n $this->dummy = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearOperations()\n {\n $this->_operations = array();\n\n return $this;\n }", "public function clear()\n {\n $this->shnttype = null;\n $this->shnttypedesc = null;\n $this->oehhnbr = null;\n $this->shntyear = null;\n $this->oedhline = null;\n $this->shntlotser = null;\n $this->shntpickticket = null;\n $this->shntpackticket = null;\n $this->shntinvoice = null;\n $this->shntacknow = null;\n $this->shntseq = null;\n $this->shntnote = null;\n $this->shntkey2 = null;\n $this->shntform = null;\n $this->dateupdtd = null;\n $this->timeupdtd = null;\n $this->dummy = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearNoticias()\n\t{\n\t\t$this->collNoticias = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clear()\n {\n $this->collection->clear();\n $this->keys = [];\n }", "public function clearCollection()\n {\n $this->collections = [];\n }", "public function clear()\n {\n $this->feature_cvterm_id = null;\n $this->feature_id = null;\n $this->cvterm_id = null;\n $this->pub_id = null;\n $this->is_not = null;\n $this->rank = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearCOMVendeurs()\n {\n $this->collCOMVendeurs = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearInappropriates()\n\t{\n\t\t$this->collInappropriates = null; // important to set this to NULL since that means it is uninitialized\n\t}", "function clear()\r\n\t{\r\n\t\t$this->id = 0;\r\n\t\t$this->competitionId = 0;\r\n\t\t$this->dayNo = 0;\r\n\t\t$this->firstStart = '';\r\n\t\t$this->lastStart = '';\r\n\t\t$this->patrolSpace = 0;\r\n\t\t$this->maxStation = 0;\r\n\t}", "public function clear() {\n $this->collection = [];\n $this->noteCollectionChanged();\n }", "private function clear()\n {\n $this->mappedQueries = [];\n $this->mappedFilters = [];\n $this->requestData = [];\n }", "public function clearCOMConditions()\n {\n $this->collCOMConditions = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearCurrentOperation()\n {\n $this->currentOperation = null;\n }", "public function clearOffensives()\n\t{\n\t\t$this->collOffensives = null; // important to set this to NULL since that means it is uninitialized\n\t}", "function clear()\r\n\t{\r\n\t\t// Clear the all list\r\n\t\t$this->all = array();\r\n\r\n\t\t// Clear errors\r\n\t\t$this->error = new stdClass();\r\n\t\t$this->error->all = array();\r\n\t\t$this->error->string = '';\r\n\r\n\t\t// Clear this objects properties and set blank error messages in case they are accessed\r\n\t\tforeach ($this->fields as $field)\r\n\t\t{\r\n\t\t\t$this->{$field} = NULL;\r\n\t\t\t$this->error->{$field} = '';\r\n\t\t}\r\n\r\n\t\t// Clear this objects \"has many\" related objects\r\n\t\tforeach ($this->has_many as $related)\r\n\t\t{\r\n\t\t\tunset($this->{$related});\r\n\t\t}\r\n\r\n\t\t// Clear this objects \"has one\" related objects\r\n\t\tforeach ($this->has_one as $related)\r\n\t\t{\r\n\t\t\tunset($this->{$related});\r\n\t\t}\r\n\r\n\t\t// Clear the query related list\r\n\t\t$this->query_related = array();\r\n\r\n\t\t// Clear and refresh stored values\r\n\t\t$this->stored = new stdClass();\r\n\r\n\t\t$this->_refresh_stored_values();\r\n\t}", "public function clearItems()\n {\n $this->collItems = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clear()\n\t{\n\t\t$this->getObject()->clear();\n\t}", "public function clearPainRatings()\n {\n $this->collPainRatings = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clear()\n {\n if (null !== $this->aPublisher) {\n $this->aPublisher->removeBiblio($this);\n }\n if (null !== $this->aLanguage) {\n $this->aLanguage->removeBiblio($this);\n }\n if (null !== $this->aPlace) {\n $this->aPlace->removeBiblio($this);\n }\n if (null !== $this->aFrequency) {\n $this->aFrequency->removeBiblio($this);\n }\n if (null !== $this->aUser) {\n $this->aUser->removeBiblio($this);\n }\n $this->biblio_id = null;\n $this->title = null;\n $this->sor = null;\n $this->edition = null;\n $this->isbn_issn = null;\n $this->publisher_id = null;\n $this->publish_year = null;\n $this->collation = null;\n $this->series_title = null;\n $this->call_number = null;\n $this->language_id = null;\n $this->source = null;\n $this->publish_place_id = null;\n $this->classification = null;\n $this->notes = null;\n $this->image = null;\n $this->file_att = null;\n $this->opac_hide = null;\n $this->promoted = null;\n $this->labels = null;\n $this->frequency_id = null;\n $this->spec_detail_info = null;\n $this->input_date = null;\n $this->last_update = null;\n $this->uid = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clear()\n\t{\n\t\t$this->co_usuario = null;\n\t\t$this->nu_cpf = null;\n\t\t$this->ds_password = null;\n\t\t$this->no_usuario = null;\n\t\t$this->ds_login = null;\n\t\t$this->dt_ultimo_login = null;\n\t\t$this->ds_email = null;\n\t\t$this->co_perfil = null;\n\t\t$this->nu_celular = null;\n\t\t$this->nu_telefone = null;\n\t\t$this->st_usuario = null;\n\t\t$this->alreadyInSave = false;\n\t\t$this->alreadyInValidation = false;\n\t\t$this->clearAllReferences();\n\t\t$this->applyDefaultValues();\n\t\t$this->resetModified();\n\t\t$this->setNew(true);\n\t\t$this->setDeleted(false);\n\t}", "public function clearCMDTAppareils()\n {\n $this->collCMDTAppareils = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clear()\n {\n if (null !== $this->aSociete) {\n $this->aSociete->removeCommande($this);\n }\n if (null !== $this->aMTransport) {\n $this->aMTransport->removeCommande($this);\n }\n $this->id_commande = null;\n $this->reference = null;\n $this->soc_id_fk = null;\n $this->transport_fk = null;\n $this->quantite = null;\n $this->prix = null;\n $this->delai = null;\n $this->dte_commande = null;\n $this->priorite = null;\n $this->note = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearRatings()\n {\n $this->collRatings = null; // important to set this to NULL since that means it is uninitialized\n }" ]
[ "0.674621", "0.6288673", "0.6185417", "0.60685194", "0.603315", "0.5999126", "0.5965161", "0.59575105", "0.595447", "0.5941018", "0.5928908", "0.5921569", "0.5875568", "0.5865466", "0.58006847", "0.5782392", "0.57652754", "0.57650787", "0.5749568", "0.5733896", "0.56765324", "0.5674769", "0.5628459", "0.56276095", "0.55843484", "0.55538785", "0.5552039", "0.55508447", "0.5541118", "0.5535109" ]
0.8006322
0
Initializes the collOperationPrestationss collection. By default this just sets the collOperationPrestationss collection to an empty array (like clearcollOperationPrestationss()); however, you may wish to override this method in your stub class to provide setting appropriate to your application for example, setting the initial array to the values stored in database.
public function initOperationPrestationss($overrideExisting = true) { if (null !== $this->collOperationPrestationss && !$overrideExisting) { return; } $this->collOperationPrestationss = new PropelObjectCollection(); $this->collOperationPrestationss->setModel('OperationPrestations'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOperationPrestationss(PropelCollection $operationPrestationss, PropelPDO $con = null)\n {\n $operationPrestationssToDelete = $this->getOperationPrestationss(new Criteria(), $con)->diff($operationPrestationss);\n\n\n $this->operationPrestationssScheduledForDeletion = $operationPrestationssToDelete;\n\n foreach ($operationPrestationssToDelete as $operationPrestationsRemoved) {\n $operationPrestationsRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationPrestationss = null;\n foreach ($operationPrestationss as $operationPrestations) {\n $this->addOperationPrestations($operationPrestations);\n }\n\n $this->collOperationPrestationss = $operationPrestationss;\n $this->collOperationPrestationssPartial = false;\n\n return $this;\n }", "public function addOperationPrestations(OperationPrestations $l)\n {\n if ($this->collOperationPrestationss === null) {\n $this->initOperationPrestationss();\n $this->collOperationPrestationssPartial = true;\n }\n\n if (!in_array($l, $this->collOperationPrestationss->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddOperationPrestations($l);\n\n if ($this->operationPrestationssScheduledForDeletion and $this->operationPrestationssScheduledForDeletion->contains($l)) {\n $this->operationPrestationssScheduledForDeletion->remove($this->operationPrestationssScheduledForDeletion->search($l));\n }\n }\n\n return $this;\n }", "public function getOperationPrestationss($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationPrestationssPartial && !$this->isNew();\n if (null === $this->collOperationPrestationss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationPrestationss) {\n // return empty collection\n $this->initOperationPrestationss();\n } else {\n $collOperationPrestationss = OperationPrestationsQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collOperationPrestationssPartial && count($collOperationPrestationss)) {\n $this->initOperationPrestationss(false);\n\n foreach ($collOperationPrestationss as $obj) {\n if (false == $this->collOperationPrestationss->contains($obj)) {\n $this->collOperationPrestationss->append($obj);\n }\n }\n\n $this->collOperationPrestationssPartial = true;\n }\n\n $collOperationPrestationss->getInternalIterator()->rewind();\n\n return $collOperationPrestationss;\n }\n\n if ($partial && $this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $obj) {\n if ($obj->isNew()) {\n $collOperationPrestationss[] = $obj;\n }\n }\n }\n\n $this->collOperationPrestationss = $collOperationPrestationss;\n $this->collOperationPrestationssPartial = false;\n }\n }\n\n return $this->collOperationPrestationss;\n }", "public function clearOperationPrestationss()\n {\n $this->collOperationPrestationss = null; // important to set this to null since that means it is uninitialized\n $this->collOperationPrestationssPartial = null;\n\n return $this;\n }", "public function countOperationPrestationss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n {\n $partial = $this->collOperationPrestationssPartial && !$this->isNew();\n if (null === $this->collOperationPrestationss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationPrestationss) {\n return 0;\n }\n\n if ($partial && !$criteria) {\n return count($this->getOperationPrestationss());\n }\n $query = OperationPrestationsQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByOperationPrimes($this)\n ->count($con);\n }\n\n return count($this->collOperationPrestationss);\n }", "public function getOperationPrestationssJoinRPrestations($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('RPrestations', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getOperationPrestationssJoinOperationScenarii($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('OperationScenarii', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getOperationPrestationssJoinOperations($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('Operations', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function filterByRPrestations($rPrestations, $comparison = null)\n {\n if ($rPrestations instanceof RPrestations) {\n return $this\n ->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestations->getRPrestationId(), $comparison);\n } elseif ($rPrestations instanceof PropelObjectCollection) {\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n\n return $this\n ->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestations->toKeyValue('PrimaryKey', 'RPrestationId'), $comparison);\n } else {\n throw new PropelException('filterByRPrestations() only accepts arguments of type RPrestations or PropelCollection');\n }\n }", "public function getOperationPrestationssJoinOperationRubriques($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('OperationRubriques', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function resetPartialOperationPrestationss($v = true)\n {\n $this->collOperationPrestationssPartial = $v;\n }", "public function setPreReqs()\n {\n $dc = new DAOCadeira();\n $this->preReqs = $dc->getPreReqsByReqId($this->idCadeira);\n\n }", "public function setNumIdccPrestationTravail($numIdccPrestationTravail) {\n $this->numIdccPrestationTravail = $numIdccPrestationTravail;\n return $this;\n }", "protected function init()\n {\n $this->totais = [\n 'liquidados' => 0,\n 'entradas' => 0,\n 'baixados' => 0,\n 'protestados' => 0,\n 'erros' => 0,\n 'alterados' => 0,\n ];\n }", "protected function init()\n {\n $this->totais = [\n 'liquidados' => 0,\n 'entradas' => 0,\n 'baixados' => 0,\n 'protestados' => 0,\n 'erros' => 0,\n 'alterados' => 0,\n ];\n }", "public function initOperationScenariis($overrideExisting = true)\n {\n if (null !== $this->collOperationScenariis && !$overrideExisting) {\n return;\n }\n $this->collOperationScenariis = new PropelObjectCollection();\n $this->collOperationScenariis->setModel('OperationScenarii');\n }", "public function getNumIdccPrestationTravail() {\n return $this->numIdccPrestationTravail;\n }", "public function init()\n {\n $this->setProcessor(new NoticesDBProcessor());\n }", "public function getOperationPrestationssJoinUsers($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('Users', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function filterByRPrestationId($rPrestationId = null, $comparison = null)\n {\n if (is_array($rPrestationId)) {\n $useMinMax = false;\n if (isset($rPrestationId['min'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestationId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($rPrestationId['max'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestationId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestationId, $comparison);\n }", "public function initQuestionVotes()\n\t{\n\t\t$this->collQuestionVotes = array();\n\t}", "private function init() {\n $this->initCronIntervalDescriptions();\n $this->initLastSaves();\n $this->initTotals();\n $this->initLastCronRunInfo();\n $this->initNextCronRunInfo();\n $this->initCurrentlyBeingDone();\n $this->initActiveSites();\n }", "public function initShoppingCarts()\n\t{\n\t\t$this->collShoppingCarts = array();\n\t}", "public function initialize()\n {\n $this->setSchema(\"watches_online\");\n $this->setSource(\"product\");\n }", "public function filterByFactPrestOrder($factPrestOrder = null, $comparison = null)\n {\n if (is_array($factPrestOrder)) {\n $useMinMax = false;\n if (isset($factPrestOrder['min'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::FACT_PREST_ORDER, $factPrestOrder['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($factPrestOrder['max'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::FACT_PREST_ORDER, $factPrestOrder['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(FacturesPrestationsPeer::FACT_PREST_ORDER, $factPrestOrder, $comparison);\n }", "public function setOperationScenariis(PropelCollection $operationScenariis, PropelPDO $con = null)\n {\n $operationScenariisToDelete = $this->getOperationScenariis(new Criteria(), $con)->diff($operationScenariis);\n\n\n $this->operationScenariisScheduledForDeletion = $operationScenariisToDelete;\n\n foreach ($operationScenariisToDelete as $operationScenariiRemoved) {\n $operationScenariiRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationScenariis = null;\n foreach ($operationScenariis as $operationScenarii) {\n $this->addOperationScenarii($operationScenarii);\n }\n\n $this->collOperationScenariis = $operationScenariis;\n $this->collOperationScenariisPartial = false;\n\n return $this;\n }", "public function initInappropriates()\n\t{\n\t\t$this->collInappropriates = array();\n\t}", "public static function GetPrestataireListe() {\n\t\t$sql = 'CALL get_all_presta_nom()';\n\t\treturn DatabaseHandler::GetAll($sql);\n\t}", "public function filterByFactPrestTauxPartiel($factPrestTauxPartiel = null, $comparison = null)\n {\n if (is_array($factPrestTauxPartiel)) {\n $useMinMax = false;\n if (isset($factPrestTauxPartiel['min'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::FACT_PREST_TAUX_PARTIEL, $factPrestTauxPartiel['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($factPrestTauxPartiel['max'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::FACT_PREST_TAUX_PARTIEL, $factPrestTauxPartiel['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(FacturesPrestationsPeer::FACT_PREST_TAUX_PARTIEL, $factPrestTauxPartiel, $comparison);\n }", "public function initialize()\n {\n $this->setSchema(\"calculadoras\");\n $this->setSource(\"paises\");\n }" ]
[ "0.73556983", "0.6526355", "0.63225114", "0.6301389", "0.57139075", "0.5607161", "0.5303804", "0.5236978", "0.5098507", "0.5087634", "0.50738126", "0.48939562", "0.4883697", "0.4818911", "0.48068157", "0.47963655", "0.4773215", "0.4769695", "0.47458127", "0.46931636", "0.46427098", "0.45904133", "0.45637965", "0.4560931", "0.4526701", "0.45181432", "0.45045203", "0.449563", "0.448759", "0.4482278" ]
0.7210099
1
Gets an array of OperationPrestations objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the cached collection is returned. If this OperationPrimes is new, it will return an empty collection or the current collection; the criteria is ignored on a new object.
public function getOperationPrestationss($criteria = null, PropelPDO $con = null) { $partial = $this->collOperationPrestationssPartial && !$this->isNew(); if (null === $this->collOperationPrestationss || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collOperationPrestationss) { // return empty collection $this->initOperationPrestationss(); } else { $collOperationPrestationss = OperationPrestationsQuery::create(null, $criteria) ->filterByOperationPrimes($this) ->find($con); if (null !== $criteria) { if (false !== $this->collOperationPrestationssPartial && count($collOperationPrestationss)) { $this->initOperationPrestationss(false); foreach ($collOperationPrestationss as $obj) { if (false == $this->collOperationPrestationss->contains($obj)) { $this->collOperationPrestationss->append($obj); } } $this->collOperationPrestationssPartial = true; } $collOperationPrestationss->getInternalIterator()->rewind(); return $collOperationPrestationss; } if ($partial && $this->collOperationPrestationss) { foreach ($this->collOperationPrestationss as $obj) { if ($obj->isNew()) { $collOperationPrestationss[] = $obj; } } } $this->collOperationPrestationss = $collOperationPrestationss; $this->collOperationPrestationssPartial = false; } } return $this->collOperationPrestationss; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperationScenariis($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationScenariisPartial && !$this->isNew();\n if (null === $this->collOperationScenariis || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationScenariis) {\n // return empty collection\n $this->initOperationScenariis();\n } else {\n $collOperationScenariis = OperationScenariiQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collOperationScenariisPartial && count($collOperationScenariis)) {\n $this->initOperationScenariis(false);\n\n foreach ($collOperationScenariis as $obj) {\n if (false == $this->collOperationScenariis->contains($obj)) {\n $this->collOperationScenariis->append($obj);\n }\n }\n\n $this->collOperationScenariisPartial = true;\n }\n\n $collOperationScenariis->getInternalIterator()->rewind();\n\n return $collOperationScenariis;\n }\n\n if ($partial && $this->collOperationScenariis) {\n foreach ($this->collOperationScenariis as $obj) {\n if ($obj->isNew()) {\n $collOperationScenariis[] = $obj;\n }\n }\n }\n\n $this->collOperationScenariis = $collOperationScenariis;\n $this->collOperationScenariisPartial = false;\n }\n }\n\n return $this->collOperationScenariis;\n }", "public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n // return empty collection\n $this->initLnkOperationPrimeRCountriess();\n } else {\n $collLnkOperationPrimeRCountriess = LnkOperationPrimeRCountriesQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collLnkOperationPrimeRCountriessPartial && count($collLnkOperationPrimeRCountriess)) {\n $this->initLnkOperationPrimeRCountriess(false);\n\n foreach ($collLnkOperationPrimeRCountriess as $obj) {\n if (false == $this->collLnkOperationPrimeRCountriess->contains($obj)) {\n $this->collLnkOperationPrimeRCountriess->append($obj);\n }\n }\n\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n $collLnkOperationPrimeRCountriess->getInternalIterator()->rewind();\n\n return $collLnkOperationPrimeRCountriess;\n }\n\n if ($partial && $this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $obj) {\n if ($obj->isNew()) {\n $collLnkOperationPrimeRCountriess[] = $obj;\n }\n }\n }\n\n $this->collLnkOperationPrimeRCountriess = $collLnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n }\n }\n\n return $this->collLnkOperationPrimeRCountriess;\n }", "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n\n return $criteria;\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_ID)) $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n if ($this->isColumnModified(OperationPrimesPeer::OP_ID)) $criteria->add(OperationPrimesPeer::OP_ID, $this->op_id);\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_LIBELLE)) $criteria->add(OperationPrimesPeer::OP_PRIME_LIBELLE, $this->op_prime_libelle);\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_NUMERO)) $criteria->add(OperationPrimesPeer::OP_PRIME_NUMERO, $this->op_prime_numero);\n if ($this->isColumnModified(OperationPrimesPeer::GDL_ART_ID)) $criteria->add(OperationPrimesPeer::GDL_ART_ID, $this->gdl_art_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID, $this->operation_prime_currency_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID, $this->operation_prime_r_reward_type_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID, $this->operation_prime_r_reward_expedition_mode_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID, $this->operation_prime_r_reward_transporter_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT, $this->operation_prime_fixed_amount);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE, $this->operation_prime_product_price_pourcentage);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT, $this->operation_prime_maximum_amount);\n\n return $criteria;\n }", "public function getOperationPrestationssJoinOperationRubriques($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('OperationRubriques', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getPremios($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collPremios || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collPremios) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initPremios();\n\t\t\t} else {\n\t\t\t\t$collPremios = PremioQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collPremios;\n\t\t\t\t}\n\t\t\t\t$this->collPremios = $collPremios;\n\t\t\t}\n\t\t}\n\t\treturn $this->collPremios;\n\t}", "public function getOperationPrestationssJoinOperations($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('Operations', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getCMDPieces(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCMDPiecesPartial && !$this->isNew();\n if (null === $this->collCMDPieces || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCMDPieces) {\n // return empty collection\n $this->initCMDPieces();\n } else {\n $collCMDPieces = ChildCMDPieceQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCMDPiecesPartial && count($collCMDPieces)) {\n $this->initCMDPieces(false);\n\n foreach ($collCMDPieces as $obj) {\n if (false == $this->collCMDPieces->contains($obj)) {\n $this->collCMDPieces->append($obj);\n }\n }\n\n $this->collCMDPiecesPartial = true;\n }\n\n return $collCMDPieces;\n }\n\n if ($partial && $this->collCMDPieces) {\n foreach ($this->collCMDPieces as $obj) {\n if ($obj->isNew()) {\n $collCMDPieces[] = $obj;\n }\n }\n }\n\n $this->collCMDPieces = $collCMDPieces;\n $this->collCMDPiecesPartial = false;\n }\n }\n\n return $this->collCMDPieces;\n }", "public function getCOMConditions(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCOMConditionsPartial && !$this->isNew();\n if (null === $this->collCOMConditions || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCOMConditions) {\n // return empty collection\n $this->initCOMConditions();\n } else {\n $collCOMConditions = ChildCOMConditionQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCOMConditionsPartial && count($collCOMConditions)) {\n $this->initCOMConditions(false);\n\n foreach ($collCOMConditions as $obj) {\n if (false == $this->collCOMConditions->contains($obj)) {\n $this->collCOMConditions->append($obj);\n }\n }\n\n $this->collCOMConditionsPartial = true;\n }\n\n return $collCOMConditions;\n }\n\n if ($partial && $this->collCOMConditions) {\n foreach ($this->collCOMConditions as $obj) {\n if ($obj->isNew()) {\n $collCOMConditions[] = $obj;\n }\n }\n }\n\n $this->collCOMConditions = $collCOMConditions;\n $this->collCOMConditionsPartial = false;\n }\n }\n\n return $this->collCOMConditions;\n }", "public function getFeatureCvtermprops($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collFeatureCvtermpropsPartial && !$this->isNew();\n if (null === $this->collFeatureCvtermprops || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collFeatureCvtermprops) {\n // return empty collection\n $this->initFeatureCvtermprops();\n } else {\n $collFeatureCvtermprops = FeatureCvtermpropQuery::create(null, $criteria)\n ->filterByFeatureCvterm($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collFeatureCvtermpropsPartial && count($collFeatureCvtermprops)) {\n $this->initFeatureCvtermprops(false);\n\n foreach($collFeatureCvtermprops as $obj) {\n if (false == $this->collFeatureCvtermprops->contains($obj)) {\n $this->collFeatureCvtermprops->append($obj);\n }\n }\n\n $this->collFeatureCvtermpropsPartial = true;\n }\n\n $collFeatureCvtermprops->getInternalIterator()->rewind();\n return $collFeatureCvtermprops;\n }\n\n if($partial && $this->collFeatureCvtermprops) {\n foreach($this->collFeatureCvtermprops as $obj) {\n if($obj->isNew()) {\n $collFeatureCvtermprops[] = $obj;\n }\n }\n }\n\n $this->collFeatureCvtermprops = $collFeatureCvtermprops;\n $this->collFeatureCvtermpropsPartial = false;\n }\n }\n\n return $this->collFeatureCvtermprops;\n }", "public function getOperationPrestationssJoinRPrestations($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('RPrestations', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getInappropriates($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PostPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collInappropriates === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collInappropriates = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(InappropriatePeer::POST_ID, $this->id);\n\n\t\t\t\tInappropriatePeer::addSelectColumns($criteria);\n\t\t\t\t$this->collInappropriates = InappropriatePeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(InappropriatePeer::POST_ID, $this->id);\n\n\t\t\t\tInappropriatePeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastInappropriateCriteria) || !$this->lastInappropriateCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collInappropriates = InappropriatePeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastInappropriateCriteria = $criteria;\n\t\treturn $this->collInappropriates;\n\t}", "public function getCOMVendeurs(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCOMVendeursPartial && !$this->isNew();\n if (null === $this->collCOMVendeurs || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCOMVendeurs) {\n // return empty collection\n $this->initCOMVendeurs();\n } else {\n $collCOMVendeurs = ChildCOMVendeurQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCOMVendeursPartial && count($collCOMVendeurs)) {\n $this->initCOMVendeurs(false);\n\n foreach ($collCOMVendeurs as $obj) {\n if (false == $this->collCOMVendeurs->contains($obj)) {\n $this->collCOMVendeurs->append($obj);\n }\n }\n\n $this->collCOMVendeursPartial = true;\n }\n\n return $collCOMVendeurs;\n }\n\n if ($partial && $this->collCOMVendeurs) {\n foreach ($this->collCOMVendeurs as $obj) {\n if ($obj->isNew()) {\n $collCOMVendeurs[] = $obj;\n }\n }\n }\n\n $this->collCOMVendeurs = $collCOMVendeurs;\n $this->collCOMVendeursPartial = false;\n }\n }\n\n return $this->collCOMVendeurs;\n }", "public function get_criteria() { return $this->criteria_list; }", "public function getColetaPesquisas($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collColetaPesquisas || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collColetaPesquisas) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initColetaPesquisas();\n\t\t\t} else {\n\t\t\t\t$collColetaPesquisas = ColetaPesquisaQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collColetaPesquisas;\n\t\t\t\t}\n\t\t\t\t$this->collColetaPesquisas = $collColetaPesquisas;\n\t\t\t}\n\t\t}\n\t\treturn $this->collColetaPesquisas;\n\t}", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(C060InventarioPeer::DATABASE_NAME);\n\n\t\t$criteria->add(C060InventarioPeer::CO_NUM_INVENTARIO, $this->co_num_inventario);\n\n\t\treturn $criteria;\n\t}", "public function getCriteria()\n {\n return $this->criteria;\n }", "public function getCriteria()\n {\n return $this->criteria;\n }", "public function getCriteria()\n\t{\n\t\treturn $this->criteria;\n\t}", "public function getCriteria()\n {\n return isset($this->criteria) ? $this->criteria : null;\n }", "public function getContributionss(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collContributionssPartial && !$this->isNew();\n if (null === $this->collContributionss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collContributionss) {\n // return empty collection\n $this->initContributionss();\n } else {\n $collContributionss = ChildContributionsQuery::create(null, $criteria)\n ->filterByIssues($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collContributionssPartial && count($collContributionss)) {\n $this->initContributionss(false);\n\n foreach ($collContributionss as $obj) {\n if (false == $this->collContributionss->contains($obj)) {\n $this->collContributionss->append($obj);\n }\n }\n\n $this->collContributionssPartial = true;\n }\n\n return $collContributionss;\n }\n\n if ($partial && $this->collContributionss) {\n foreach ($this->collContributionss as $obj) {\n if ($obj->isNew()) {\n $collContributionss[] = $obj;\n }\n }\n }\n\n $this->collContributionss = $collContributionss;\n $this->collContributionssPartial = false;\n }\n }\n\n return $this->collContributionss;\n }", "public function getPesquisas($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collPesquisas || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collPesquisas) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initPesquisas();\n\t\t\t} else {\n\t\t\t\t$collPesquisas = PesquisaQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collPesquisas;\n\t\t\t\t}\n\t\t\t\t$this->collPesquisas = $collPesquisas;\n\t\t\t}\n\t\t}\n\t\treturn $this->collPesquisas;\n\t}", "protected function getPreviousCollection(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria)\n {\n $searchCriteria = $this->filterHelper->removeLastFilterGroup(clone $searchCriteria);\n return $this->productHelper->buildCollection($searchCriteria);\n }", "public function getOperationPrestationssJoinHistoCouts($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('HistoCouts', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getCriteria(){\n return $this->criteria;\n }", "public function getClips($criteria)\n {\n }", "public function getShoppingCarts($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(UserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collShoppingCarts === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collShoppingCarts = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(ShoppingCartPeer::USER_ID, $this->id);\n\n\t\t\t\tShoppingCartPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collShoppingCarts = ShoppingCartPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(ShoppingCartPeer::USER_ID, $this->id);\n\n\t\t\t\tShoppingCartPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastShoppingCartCriteria) || !$this->lastShoppingCartCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collShoppingCarts = ShoppingCartPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastShoppingCartCriteria = $criteria;\n\t\treturn $this->collShoppingCarts;\n\t}", "public function getNoticias($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collNoticias || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collNoticias) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initNoticias();\n\t\t\t} else {\n\t\t\t\t$collNoticias = NoticiaQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collNoticias;\n\t\t\t\t}\n\t\t\t\t$this->collNoticias = $collNoticias;\n\t\t\t}\n\t\t}\n\t\treturn $this->collNoticias;\n\t}", "public function getOperationPrestationssJoinOperationScenarii($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('OperationScenarii', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getOperationPrestationssJoinUsers($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('Users', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }" ]
[ "0.69494057", "0.6451171", "0.5951217", "0.58791965", "0.5715523", "0.55273855", "0.54977137", "0.5471179", "0.5467212", "0.5393388", "0.5346385", "0.5292309", "0.52794075", "0.5270325", "0.5226816", "0.52264035", "0.5216543", "0.5216543", "0.52002007", "0.5180528", "0.5170102", "0.51697296", "0.5165677", "0.51379997", "0.5116732", "0.5113889", "0.51100266", "0.5102742", "0.5094901", "0.50854945" ]
0.78791815
0
Sets a collection of OperationPrestations objects related by a onetomany relationship to the current object. It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.
public function setOperationPrestationss(PropelCollection $operationPrestationss, PropelPDO $con = null) { $operationPrestationssToDelete = $this->getOperationPrestationss(new Criteria(), $con)->diff($operationPrestationss); $this->operationPrestationssScheduledForDeletion = $operationPrestationssToDelete; foreach ($operationPrestationssToDelete as $operationPrestationsRemoved) { $operationPrestationsRemoved->setOperationPrimes(null); } $this->collOperationPrestationss = null; foreach ($operationPrestationss as $operationPrestations) { $this->addOperationPrestations($operationPrestations); } $this->collOperationPrestationss = $operationPrestationss; $this->collOperationPrestationssPartial = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addOperationPrestations(OperationPrestations $l)\n {\n if ($this->collOperationPrestationss === null) {\n $this->initOperationPrestationss();\n $this->collOperationPrestationssPartial = true;\n }\n\n if (!in_array($l, $this->collOperationPrestationss->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddOperationPrestations($l);\n\n if ($this->operationPrestationssScheduledForDeletion and $this->operationPrestationssScheduledForDeletion->contains($l)) {\n $this->operationPrestationssScheduledForDeletion->remove($this->operationPrestationssScheduledForDeletion->search($l));\n }\n }\n\n return $this;\n }", "public function initOperationPrestationss($overrideExisting = true)\n {\n if (null !== $this->collOperationPrestationss && !$overrideExisting) {\n return;\n }\n $this->collOperationPrestationss = new PropelObjectCollection();\n $this->collOperationPrestationss->setModel('OperationPrestations');\n }", "public function setOperationScenariis(PropelCollection $operationScenariis, PropelPDO $con = null)\n {\n $operationScenariisToDelete = $this->getOperationScenariis(new Criteria(), $con)->diff($operationScenariis);\n\n\n $this->operationScenariisScheduledForDeletion = $operationScenariisToDelete;\n\n foreach ($operationScenariisToDelete as $operationScenariiRemoved) {\n $operationScenariiRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationScenariis = null;\n foreach ($operationScenariis as $operationScenarii) {\n $this->addOperationScenarii($operationScenarii);\n }\n\n $this->collOperationScenariis = $operationScenariis;\n $this->collOperationScenariisPartial = false;\n\n return $this;\n }", "public function clearOperationPrestationss()\n {\n $this->collOperationPrestationss = null; // important to set this to null since that means it is uninitialized\n $this->collOperationPrestationssPartial = null;\n\n return $this;\n }", "public function getOperationPrestationss($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationPrestationssPartial && !$this->isNew();\n if (null === $this->collOperationPrestationss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationPrestationss) {\n // return empty collection\n $this->initOperationPrestationss();\n } else {\n $collOperationPrestationss = OperationPrestationsQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collOperationPrestationssPartial && count($collOperationPrestationss)) {\n $this->initOperationPrestationss(false);\n\n foreach ($collOperationPrestationss as $obj) {\n if (false == $this->collOperationPrestationss->contains($obj)) {\n $this->collOperationPrestationss->append($obj);\n }\n }\n\n $this->collOperationPrestationssPartial = true;\n }\n\n $collOperationPrestationss->getInternalIterator()->rewind();\n\n return $collOperationPrestationss;\n }\n\n if ($partial && $this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $obj) {\n if ($obj->isNew()) {\n $collOperationPrestationss[] = $obj;\n }\n }\n }\n\n $this->collOperationPrestationss = $collOperationPrestationss;\n $this->collOperationPrestationssPartial = false;\n }\n }\n\n return $this->collOperationPrestationss;\n }", "public function setRelations(Collection $relations);", "public function setRelations() {}", "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collOperationScenariis) {\n foreach ($this->collOperationScenariis as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aOperations instanceof Persistent) {\n $this->aOperations->clearAllReferences($deep);\n }\n if ($this->aRCurrencies instanceof Persistent) {\n $this->aRCurrencies->clearAllReferences($deep);\n }\n if ($this->aRRewardTypes instanceof Persistent) {\n $this->aRRewardTypes->clearAllReferences($deep);\n }\n if ($this->aRRewardExpeditionModes instanceof Persistent) {\n $this->aRRewardExpeditionModes->clearAllReferences($deep);\n }\n if ($this->aRRewardTransporters instanceof Persistent) {\n $this->aRRewardTransporters->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collOperationPrestationss instanceof PropelCollection) {\n $this->collOperationPrestationss->clearIterator();\n }\n $this->collOperationPrestationss = null;\n if ($this->collOperationScenariis instanceof PropelCollection) {\n $this->collOperationScenariis->clearIterator();\n }\n $this->collOperationScenariis = null;\n if ($this->collLnkOperationPrimeRCountriess instanceof PropelCollection) {\n $this->collLnkOperationPrimeRCountriess->clearIterator();\n }\n $this->collLnkOperationPrimeRCountriess = null;\n $this->aOperations = null;\n $this->aRCurrencies = null;\n $this->aRRewardTypes = null;\n $this->aRRewardExpeditionModes = null;\n $this->aRRewardTransporters = null;\n }", "public function setRuangs(PropelCollection $ruangs, PropelPDO $con = null)\n {\n $ruangsToDelete = $this->getRuangs(new Criteria(), $con)->diff($ruangs);\n\n $this->ruangsScheduledForDeletion = unserialize(serialize($ruangsToDelete));\n\n foreach ($ruangsToDelete as $ruangRemoved) {\n $ruangRemoved->setBangunan(null);\n }\n\n $this->collRuangs = null;\n foreach ($ruangs as $ruang) {\n $this->addRuang($ruang);\n }\n\n $this->collRuangs = $ruangs;\n $this->collRuangsPartial = false;\n\n return $this;\n }", "public function setPremios(PropelCollection $premios, PropelPDO $con = null)\n\t{\n\t\t$this->premiosScheduledForDeletion = $this->getPremios(new Criteria(), $con)->diff($premios);\n\n\t\tforeach ($premios as $premio) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($premio->isNew()) {\n\t\t\t\t$premio->setUsuario($this);\n\t\t\t}\n\t\t\t$this->addPremio($premio);\n\t\t}\n\n\t\t$this->collPremios = $premios;\n\t}", "public function setCMDTAppareils(Collection $cMDTAppareils, ConnectionInterface $con = null)\n {\n /** @var ChildCMDTAppareil[] $cMDTAppareilsToDelete */\n $cMDTAppareilsToDelete = $this->getCMDTAppareils(new Criteria(), $con)->diff($cMDTAppareils);\n\n\n //since at least one column in the foreign key is at the same time a PK\n //we can not just set a PK to NULL in the lines below. We have to store\n //a backup of all values, so we are able to manipulate these items based on the onDelete value later.\n $this->cMDTAppareilsScheduledForDeletion = clone $cMDTAppareilsToDelete;\n\n foreach ($cMDTAppareilsToDelete as $cMDTAppareilRemoved) {\n $cMDTAppareilRemoved->setCommande(null);\n }\n\n $this->collCMDTAppareils = null;\n foreach ($cMDTAppareils as $cMDTAppareil) {\n $this->addCMDTAppareil($cMDTAppareil);\n }\n\n $this->collCMDTAppareils = $cMDTAppareils;\n $this->collCMDTAppareilsPartial = false;\n\n return $this;\n }", "private function computeScheduleInsertsChangeSets()\n {\n foreach ($this->documentInsertions as $document) {\n $class = $this->dm->getClassMetadata(get_class($document));\n\n $this->computeChangeSet($class, $document);\n }\n }", "public function resetCollectionsForPersist()\n {\n $this->containers = new ArrayCollection();\n $this->functions = new ArrayCollection();\n $this->constants = new ArrayCollection();\n }", "public function setCOMConditions(Collection $cOMConditions, ConnectionInterface $con = null)\n {\n /** @var ChildCOMCondition[] $cOMConditionsToDelete */\n $cOMConditionsToDelete = $this->getCOMConditions(new Criteria(), $con)->diff($cOMConditions);\n\n\n //since at least one column in the foreign key is at the same time a PK\n //we can not just set a PK to NULL in the lines below. We have to store\n //a backup of all values, so we are able to manipulate these items based on the onDelete value later.\n $this->cOMConditionsScheduledForDeletion = clone $cOMConditionsToDelete;\n\n foreach ($cOMConditionsToDelete as $cOMConditionRemoved) {\n $cOMConditionRemoved->setCommande(null);\n }\n\n $this->collCOMConditions = null;\n foreach ($cOMConditions as $cOMCondition) {\n $this->addCOMCondition($cOMCondition);\n }\n\n $this->collCOMConditions = $cOMConditions;\n $this->collCOMConditionsPartial = false;\n\n return $this;\n }", "public function setElectionRounds(iterable $rounds): void\n {\n $currentRoundsToRemove = new ArrayCollection($this->procurationProxyElectionRounds->toArray());\n\n foreach ($rounds as $round) {\n if (!$round instanceof ElectionRound) {\n throw new \\InvalidArgumentException(sprintf('Expected an instance of \"%s\", but got \"%s\".', ElectionRound::class, \\is_object($round) ? $round::class : \\gettype($round)));\n }\n\n if ($ppElectionRound = $this->findProcurationProxyElectionRoundBy($round)) {\n $currentRoundsToRemove->removeElement($ppElectionRound);\n\n continue;\n }\n\n $this->addElectionRound($round);\n }\n\n foreach ($currentRoundsToRemove as $round) {\n $this->procurationProxyElectionRounds->removeElement($round);\n }\n }", "public function initInappropriates()\n\t{\n\t\t$this->collInappropriates = array();\n\t}", "public function setCriteriaCollection(CriteriaCollection $collection);", "public function setRatings(Collection $ratings, ConnectionInterface $con = null)\n {\n /** @var ChildRating[] $ratingsToDelete */\n $ratingsToDelete = $this->getRatings(new Criteria(), $con)->diff($ratings);\n\n\n //since at least one column in the foreign key is at the same time a PK\n //we can not just set a PK to NULL in the lines below. We have to store\n //a backup of all values, so we are able to manipulate these items based on the onDelete value later.\n $this->ratingsScheduledForDeletion = clone $ratingsToDelete;\n\n foreach ($ratingsToDelete as $ratingRemoved) {\n $ratingRemoved->setArticle(null);\n }\n\n $this->collRatings = null;\n foreach ($ratings as $rating) {\n $this->addRating($rating);\n }\n\n $this->collRatings = $ratings;\n $this->collRatingsPartial = false;\n\n return $this;\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete;\n\n foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) {\n $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null);\n }\n\n $this->collLnkOperationPrimeRCountriess = null;\n foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) {\n $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries);\n }\n\n $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n\n return $this;\n }", "private function computeScheduleInsertsChangeSets()\n {\n foreach ($this->entityInsertions as $entity) {\n $class = $this->manager->getClassMetadata(get_class($entity));\n $this->computeChangeSet($class, $entity);\n }\n }", "public function setNoticias(PropelCollection $noticias, PropelPDO $con = null)\n\t{\n\t\t$this->noticiasScheduledForDeletion = $this->getNoticias(new Criteria(), $con)->diff($noticias);\n\n\t\tforeach ($noticias as $noticia) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($noticia->isNew()) {\n\t\t\t\t$noticia->setUsuario($this);\n\t\t\t}\n\t\t\t$this->addNoticia($noticia);\n\t\t}\n\n\t\t$this->collNoticias = $noticias;\n\t}", "public function getOperationPrestationssJoinOperations($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('Operations', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function onConstruct()\n {\n $this->useDynamicUpdate(true); // set for all, without this phalcon sometimes will re-select from database and overwrite your changes if you call save() more than 1 time\n $this->keepSnapshots(true);\n $modelRelationAlias = $this->getModelsManager()->getRelations(get_called_class());\n foreach ($modelRelationAlias as $alias)\n {\n $this->modelRelations[$alias->getType()][] = $alias->getOption('alias');\n }\n }", "public function beforeSave()\n {\n if ($this->fixResultSets)\n {\n foreach ($this->fixResultSets as $property => $__)\n {\n if (isset($this->$property) && ($value = $this->$property) instanceof \\Phalcon\\Mvc\\Model\\ResultSetInterface)\n {\n unset($this->fixResultSets[$property]);\n $this->$property = $value->filter(function($r) {\n return $r;\n });\n }\n }\n }\n }", "private function desabilitaPoolIdsObjetosManipulados()\n {\n \t// setando para null o atributo _arrayObjetosManipulados\n \t$this->_arrayObjetosManipulados = null;\n }", "public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }", "protected function _prepareCollection()\n\t{\n\t\t$collection = Mage::getResourceModel($this->_getCollectionClass());\n $collection->getSelect()->joinLeft(\n array('sfo' => 'sales_flat_order'),\n 'main_table.order_id = sfo.entity_id',\n array('increment_id')\n );\n\t\t$this->setCollection($collection);\n\n\t\treturn parent::_prepareCollection();\n\t}", "public function buildRelations()\n {\n $this->addRelation('Evaluacion', '\\\\Evaluacion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_evaluacion',\n 1 => ':eval_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Objetivo', '\\\\Objetivo', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_objetivo',\n 1 => ':obje_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_pregunta',\n 1 => ':preg_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Seccion', '\\\\Seccion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_seccion',\n 1 => ':secc_codigo',\n ),\n), null, 'CASCADE', null, false);\n }" ]
[ "0.5673637", "0.5381319", "0.5125052", "0.49006987", "0.48189643", "0.48117965", "0.47645417", "0.47203207", "0.47000292", "0.46939012", "0.4684295", "0.46268004", "0.45624357", "0.45560598", "0.4534751", "0.45255712", "0.45244035", "0.44927466", "0.4476819", "0.4476819", "0.44755816", "0.4472171", "0.44331926", "0.44051525", "0.4373516", "0.435988", "0.43329126", "0.42984635", "0.4290301", "0.4274179" ]
0.6159088
0
Method called to associate a OperationPrestations object to this object through the OperationPrestations foreign key attribute.
public function addOperationPrestations(OperationPrestations $l) { if ($this->collOperationPrestationss === null) { $this->initOperationPrestationss(); $this->collOperationPrestationssPartial = true; } if (!in_array($l, $this->collOperationPrestationss->getArrayCopy(), true)) { // only add it if the **same** object is not already associated $this->doAddOperationPrestations($l); if ($this->operationPrestationssScheduledForDeletion and $this->operationPrestationssScheduledForDeletion->contains($l)) { $this->operationPrestationssScheduledForDeletion->remove($this->operationPrestationssScheduledForDeletion->search($l)); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initOperationPrestationss($overrideExisting = true)\n {\n if (null !== $this->collOperationPrestationss && !$overrideExisting) {\n return;\n }\n $this->collOperationPrestationss = new PropelObjectCollection();\n $this->collOperationPrestationss->setModel('OperationPrestations');\n }", "public function setOperationPrestationss(PropelCollection $operationPrestationss, PropelPDO $con = null)\n {\n $operationPrestationssToDelete = $this->getOperationPrestationss(new Criteria(), $con)->diff($operationPrestationss);\n\n\n $this->operationPrestationssScheduledForDeletion = $operationPrestationssToDelete;\n\n foreach ($operationPrestationssToDelete as $operationPrestationsRemoved) {\n $operationPrestationsRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationPrestationss = null;\n foreach ($operationPrestationss as $operationPrestations) {\n $this->addOperationPrestations($operationPrestations);\n }\n\n $this->collOperationPrestationss = $operationPrestationss;\n $this->collOperationPrestationssPartial = false;\n\n return $this;\n }", "public function getOperationPrestationssJoinOperations($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('Operations', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getOperationPrestationssJoinRPrestations($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('RPrestations', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function getOperationPrestationssJoinOperationScenarii($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('OperationScenarii', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function filterByRPrestations($rPrestations, $comparison = null)\n {\n if ($rPrestations instanceof RPrestations) {\n return $this\n ->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestations->getRPrestationId(), $comparison);\n } elseif ($rPrestations instanceof PropelObjectCollection) {\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n\n return $this\n ->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestations->toKeyValue('PrimaryKey', 'RPrestationId'), $comparison);\n } else {\n throw new PropelException('filterByRPrestations() only accepts arguments of type RPrestations or PropelCollection');\n }\n }", "public function clearOperationPrestationss()\n {\n $this->collOperationPrestationss = null; // important to set this to null since that means it is uninitialized\n $this->collOperationPrestationssPartial = null;\n\n return $this;\n }", "public function getOperationPrestationssJoinOperationRubriques($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('OperationRubriques', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function initialize()\n {\n $this->belongsTo('id_segmentation', 'Entities\\Segmentation', 'id', array('foreignKey' => true, 'alias' => 'Segmentation'));\n $this->belongsTo('id_factor_network', 'Entities\\FactorNetwork', 'id', array('foreignKey' => true, 'alias' => 'FactorNetwork'));\n }", "public function getOperationPrestationss($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationPrestationssPartial && !$this->isNew();\n if (null === $this->collOperationPrestationss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationPrestationss) {\n // return empty collection\n $this->initOperationPrestationss();\n } else {\n $collOperationPrestationss = OperationPrestationsQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collOperationPrestationssPartial && count($collOperationPrestationss)) {\n $this->initOperationPrestationss(false);\n\n foreach ($collOperationPrestationss as $obj) {\n if (false == $this->collOperationPrestationss->contains($obj)) {\n $this->collOperationPrestationss->append($obj);\n }\n }\n\n $this->collOperationPrestationssPartial = true;\n }\n\n $collOperationPrestationss->getInternalIterator()->rewind();\n\n return $collOperationPrestationss;\n }\n\n if ($partial && $this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $obj) {\n if ($obj->isNew()) {\n $collOperationPrestationss[] = $obj;\n }\n }\n }\n\n $this->collOperationPrestationss = $collOperationPrestationss;\n $this->collOperationPrestationssPartial = false;\n }\n }\n\n return $this->collOperationPrestationss;\n }", "public function addOperation(string $operation): OperationInterface;", "public function addOperation(ckWsdlOperation $operation)\r\n {\r\n $this->operations[] = $operation;\r\n }", "public function issuing_station(){\n return $this->belongsTo('App\\Station', 'issuing_station');\n }", "private function setOperation(OperatorInterface $operation)\n {\n \t$this->operation = $operation;\n }", "public function countOperationPrestationss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n {\n $partial = $this->collOperationPrestationssPartial && !$this->isNew();\n if (null === $this->collOperationPrestationss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationPrestationss) {\n return 0;\n }\n\n if ($partial && !$criteria) {\n return count($this->getOperationPrestationss());\n }\n $query = OperationPrestationsQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByOperationPrimes($this)\n ->count($con);\n }\n\n return count($this->collOperationPrestationss);\n }", "public function filterByOpPrestId($opPrestId = null, $comparison = null)\n {\n if (is_array($opPrestId)) {\n $useMinMax = false;\n if (isset($opPrestId['min'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::OP_PREST_ID, $opPrestId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($opPrestId['max'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::OP_PREST_ID, $opPrestId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(FacturesPrestationsPeer::OP_PREST_ID, $opPrestId, $comparison);\n }", "public function add(Operation $operation);", "public function stations(){\n\t\t\n\t\treturn $this->belongsToMany('Alsaudi\\\\Eloquent\\\\StationRelation',\n\t\t\t'station_trip','trip_id','station_id');\n\t}", "public function station()\n {\n return $this->belongsTo(Station::class, 'station_id', 'id');\n }", "public function station()\n {\n return $this->belongsTo(Station::class, 'station_id', 'id');\n }", "public function insert($powerBaseStation){\r\n\t\t$sql = 'INSERT INTO power_base_station (station_name, station_serise_code, station_type, station_project, station_building_type, station_province, station_city, station_distirct, station_address, station_lat, station_lng, create_time, creator_id, status, project_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t\n\t\t$sqlQuery->set($powerBaseStation->stationName);\n\t\t$sqlQuery->set($powerBaseStation->stationSeriseCode);\n\t\t$sqlQuery->setNumber($powerBaseStation->stationType);\n\t\t$sqlQuery->set($powerBaseStation->stationProject);\n\t\t$sqlQuery->setNumber($powerBaseStation->stationBuildingType);\n\t\t$sqlQuery->set($powerBaseStation->stationProvince);\n\t\t$sqlQuery->set($powerBaseStation->stationCity);\n\t\t$sqlQuery->set($powerBaseStation->stationDistirct);\n\t\t$sqlQuery->set($powerBaseStation->stationAddress);\n\t\t$sqlQuery->set($powerBaseStation->stationLat);\n\t\t$sqlQuery->set($powerBaseStation->stationLng);\n\t\t$sqlQuery->setNumber($powerBaseStation->createTime);\n\t\t$sqlQuery->setNumber($powerBaseStation->creatorId);\n\t\t$sqlQuery->setNumber($powerBaseStation->status);\r\n\t\t$sqlQuery->setNumber($powerBaseStation->projectId);\r\n\t\t$id = $this->executeInsert($sqlQuery);\t\r\n\t\t$powerBaseStation->stationId = $id;\r\n\t\treturn $id;\r\n\t}", "private function _addStation($stationInformationArray)\n {\n $fiedsList = array(\n 'f_station_code', 'f_date', 'f_dev_id', 'f_name', 'f_descr', 'f_info', 'f_uid',\n 'f_status', 'f_create_time', 'f_master_name', 'f_date_min', 'f_date_max', 'f_date_last_down',\n 'f_date_sens', 'f_date_data', 'f_date_conf', 'f_measure_int', 'f_data_int', 'f_timezone',\n 'f_latitude', 'f_longitude', 'f_altitude', 'f_hw_ver_major', 'f_hw_ver_minor', 'f_sw_ver_major',\n 'f_sw_ver_minor', 'f_sms_warn_numbers', 'f_sms_warn_values', 'f_gsm_mcc', 'f_gsm_mnc', 'f_gprs_apn',\n 'f_gprs_user_id', 'f_gprs_passw', 'f_sernum', 'f_date_comm', 'f_user_station_name', 'f_user_name',\n 'custom_name', 'custom_desc', 'custom_image', 'enable_station', 'show_in_home', 'priority', 'last_editor'\n );\n foreach($fiedsList as $key)\n {\n if(!isset($stationInformationArray->{$key}))\n {\n $stationInformationArray->{$key} = NULL;\n }else\n {\n switch ($key):\n case'f_latitude':\n case'f_longitude':\n if (!empty($stationInformationArray->{$key})) {\n $stationInformationArray->{$key} = recoverLatLongData($stationInformationArray->{$key}, str_replace(\"f_\", \"\", $key));\n }\n break;\n default:\n break;\n endswitch;\n }\n }\n $newStation = new Station(\n null,\n $stationInformationArray->f_station_code,\n $stationInformationArray->f_date,\n $stationInformationArray->f_dev_id,\n $stationInformationArray->f_name,\n $stationInformationArray->f_descr,\n $stationInformationArray->f_info,\n $stationInformationArray->f_uid,\n $stationInformationArray->f_status,\n $stationInformationArray->f_create_time,\n $stationInformationArray->f_master_name,\n $stationInformationArray->f_date_min,\n $stationInformationArray->f_date_max,\n $stationInformationArray->f_date_last_down,\n $stationInformationArray->f_date_sens,\n $stationInformationArray->f_date_data,\n $stationInformationArray->f_date_conf,\n $stationInformationArray->f_measure_int,\n $stationInformationArray->f_data_int,\n $stationInformationArray->f_timezone,\n $stationInformationArray->f_latitude,\n $stationInformationArray->f_longitude,\n $stationInformationArray->f_altitude,\n $stationInformationArray->f_hw_ver_major,\n $stationInformationArray->f_hw_ver_minor,\n $stationInformationArray->f_sw_ver_major,\n $stationInformationArray->f_sw_ver_minor,\n $stationInformationArray->f_sms_warn_numbers,\n $stationInformationArray->f_sms_warn_values,\n $stationInformationArray->f_gsm_mcc,\n $stationInformationArray->f_gsm_mnc,\n $stationInformationArray->f_gprs_apn,\n $stationInformationArray->f_gprs_user_id,\n $stationInformationArray->f_gprs_passw,\n $stationInformationArray->f_sernum,\n $stationInformationArray->f_date_comm,\n $stationInformationArray->f_user_station_name,\n $stationInformationArray->f_user_name,\n $custom_name = null,\n $custom_desc = null,\n $custom_image = null,\n 1,\n (($stationInformationArray->f_latitude && $stationInformationArray->f_longitude)?(1):(0)),\n $priority = null,\n $last_update_date = null,\n $last_edition_time = null,\n $last_editor = null);\n\n if($newStation->save())\n {\n return $stationInformationArray->f_name . \" added\";\n }else\n {\n return $stationInformationArray->f_name . \" ERROR SAVING DATA\";\n }\n }", "protected function getSetUpOperation()\n {\n return new \\PHPUnit_Extensions_Database_Operation_Composite(array(\n \\PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(),\n \\PHPUnit_Extensions_Database_Operation_Factory::INSERT()\n ));\n }", "public function getOperationPrestationssJoinUsers($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = OperationPrestationsQuery::create(null, $criteria);\n $query->joinWith('Users', $join_behavior);\n\n return $this->getOperationPrestationss($query, $con);\n }", "public function train(){\n\t\t\n\t\treturn $this->belongsTo('Alsaudi\\\\Eloquent\\\\TrainRelation');\n\t}", "public function initOperationScenariis($overrideExisting = true)\n {\n if (null !== $this->collOperationScenariis && !$overrideExisting) {\n return;\n }\n $this->collOperationScenariis = new PropelObjectCollection();\n $this->collOperationScenariis->setModel('OperationScenarii');\n }", "public function precontr()\n {\n //'precontr.insegn_id', '=', 'p1_insegnamento.id'\n return $this->hasOne(Precontrattuale::class,'insegn_id','id');\n }", "public function initialize()\n {\n $schema = new Infra();\n $this->setSchema($schema->getSchemaBanco());\n $this->setSource(\"contrato_financeiro_nota_anexo\");\n $this->belongsTo('id_anexo', 'Circuitos\\Models\\Anexos', 'id', ['alias' => 'Anexos']);\n $this->belongsTo('id_contrato_financeiro_nota', 'Circuitos\\Models\\ContratoFinanceiroNota', 'id', ['alias' => 'ContratoFinanceiroNota']);\n }", "public function setNumIdccPrestationTravail($numIdccPrestationTravail) {\n $this->numIdccPrestationTravail = $numIdccPrestationTravail;\n return $this;\n }", "public function filterByRPrestationId($rPrestationId = null, $comparison = null)\n {\n if (is_array($rPrestationId)) {\n $useMinMax = false;\n if (isset($rPrestationId['min'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestationId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($rPrestationId['max'])) {\n $this->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestationId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(FacturesPrestationsPeer::R_PRESTATION_ID, $rPrestationId, $comparison);\n }" ]
[ "0.5854731", "0.5768094", "0.5285368", "0.5162804", "0.4965603", "0.48521185", "0.47333303", "0.47283053", "0.47233707", "0.46891028", "0.4627381", "0.4606199", "0.46025395", "0.4514157", "0.4506085", "0.4440997", "0.4427161", "0.44236058", "0.4386487", "0.4386487", "0.433747", "0.4294956", "0.4287367", "0.4271451", "0.4251538", "0.42418945", "0.42343783", "0.42260492", "0.42233357", "0.42083353" ]
0.73192304
0
Clears out the collOperationScenariis collection This does not modify the database; however, it will remove any associated objects, causing them to be refetched by subsequent calls to accessor method.
public function clearOperationScenariis() { $this->collOperationScenariis = null; // important to set this to null since that means it is uninitialized $this->collOperationScenariisPartial = null; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n {\n $this->collection->clear();\n $this->keys = [];\n }", "public function clearCollection()\n {\n $this->collections = [];\n }", "public function clear()\n {\n $this->op_prime_id = null;\n $this->op_id = null;\n $this->op_prime_libelle = null;\n $this->op_prime_numero = null;\n $this->gdl_art_id = null;\n $this->operation_prime_currency_id = null;\n $this->operation_prime_r_reward_type_id = null;\n $this->operation_prime_r_reward_expedition_mode_id = null;\n $this->operation_prime_r_reward_transporter_id = null;\n $this->operation_prime_fixed_amount = null;\n $this->operation_prime_product_price_pourcentage = null;\n $this->operation_prime_maximum_amount = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clear()\n {\n $this->idmontacargas = null;\n $this->idsucursal = null;\n $this->montacargas_modelo = null;\n $this->montacargas_marca = null;\n $this->montacargas_c = null;\n $this->montacargas_k = null;\n $this->montacargas_p = null;\n $this->montacargas_t = null;\n $this->montacargas_e = null;\n $this->montacargas_volts = null;\n $this->montacargas_amperaje = null;\n $this->montacargas_nombre = null;\n $this->montacargas_numserie = null;\n $this->montacargas_comprador = null;\n $this->montacargas_ciclosmant = null;\n $this->montacargas_ciclosiniciales = null;\n $this->montacargas_baja = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clear() {\n $this->collection = [];\n $this->noteCollectionChanged();\n }", "public function clear()\n\t{\n\t\t$this->getObject()->clear();\n\t}", "public function clear()\n {\n $this->feature_cvterm_id = null;\n $this->feature_id = null;\n $this->cvterm_id = null;\n $this->pub_id = null;\n $this->is_not = null;\n $this->rank = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearOperationPrestationss()\n {\n $this->collOperationPrestationss = null; // important to set this to null since that means it is uninitialized\n $this->collOperationPrestationssPartial = null;\n\n return $this;\n }", "public function clearColetaPesquisas()\n\t{\n\t\t$this->collColetaPesquisas = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearOperations()\n {\n $this->_operations = array();\n\n return $this;\n }", "public function clear()\n {\n if (null !== $this->aPublisher) {\n $this->aPublisher->removeBiblio($this);\n }\n if (null !== $this->aLanguage) {\n $this->aLanguage->removeBiblio($this);\n }\n if (null !== $this->aPlace) {\n $this->aPlace->removeBiblio($this);\n }\n if (null !== $this->aFrequency) {\n $this->aFrequency->removeBiblio($this);\n }\n if (null !== $this->aUser) {\n $this->aUser->removeBiblio($this);\n }\n $this->biblio_id = null;\n $this->title = null;\n $this->sor = null;\n $this->edition = null;\n $this->isbn_issn = null;\n $this->publisher_id = null;\n $this->publish_year = null;\n $this->collation = null;\n $this->series_title = null;\n $this->call_number = null;\n $this->language_id = null;\n $this->source = null;\n $this->publish_place_id = null;\n $this->classification = null;\n $this->notes = null;\n $this->image = null;\n $this->file_att = null;\n $this->opac_hide = null;\n $this->promoted = null;\n $this->labels = null;\n $this->frequency_id = null;\n $this->spec_detail_info = null;\n $this->input_date = null;\n $this->last_update = null;\n $this->uid = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearNoticias()\n\t{\n\t\t$this->collNoticias = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearPesquisas()\n\t{\n\t\t$this->collPesquisas = null; // important to set this to NULL since that means it is uninitialized\n\t}", "function clear()\r\n\t{\r\n\t\t// Clear the all list\r\n\t\t$this->all = array();\r\n\r\n\t\t// Clear errors\r\n\t\t$this->error = new stdClass();\r\n\t\t$this->error->all = array();\r\n\t\t$this->error->string = '';\r\n\r\n\t\t// Clear this objects properties and set blank error messages in case they are accessed\r\n\t\tforeach ($this->fields as $field)\r\n\t\t{\r\n\t\t\t$this->{$field} = NULL;\r\n\t\t\t$this->error->{$field} = '';\r\n\t\t}\r\n\r\n\t\t// Clear this objects \"has many\" related objects\r\n\t\tforeach ($this->has_many as $related)\r\n\t\t{\r\n\t\t\tunset($this->{$related});\r\n\t\t}\r\n\r\n\t\t// Clear this objects \"has one\" related objects\r\n\t\tforeach ($this->has_one as $related)\r\n\t\t{\r\n\t\t\tunset($this->{$related});\r\n\t\t}\r\n\r\n\t\t// Clear the query related list\r\n\t\t$this->query_related = array();\r\n\r\n\t\t// Clear and refresh stored values\r\n\t\t$this->stored = new stdClass();\r\n\r\n\t\t$this->_refresh_stored_values();\r\n\t}", "public function clear()\n {\n foreach ($this->objectsRepository as $repository) {\n if ($repository instanceof Repository) {\n $repository->clear();\n }\n }\n parent::clear();\n $this->objectsRepository = [];\n }", "public function clear()\n {\n $this->connection->del($this->key);\n\n if ($this->on_change) {\n call_user_func($this->on_change, []);\n }\n\n if ($this->on_clear) {\n call_user_func($this->on_clear, []);\n }\n }", "public function clear()\n {\n $this->collection = array();\n\n return $this;\n }", "public function clearItems()\n {\n $this->collItems = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clear()\n {\n if (null !== $this->aSociete) {\n $this->aSociete->removeCommande($this);\n }\n if (null !== $this->aMTransport) {\n $this->aMTransport->removeCommande($this);\n }\n $this->id_commande = null;\n $this->reference = null;\n $this->soc_id_fk = null;\n $this->transport_fk = null;\n $this->quantite = null;\n $this->prix = null;\n $this->delai = null;\n $this->dte_commande = null;\n $this->priorite = null;\n $this->note = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearOpenids()\n\t{\n\t\t$this->collOpenids = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clear(): void\n {\n $this->collectionStatsById = [];\n $this->proxyStatsByClass = [];\n }", "public function clear()\n {\n $this->repository->clear();\n }", "public function clear()\n {\n $this->sekolah_id = null;\n $this->semester_id = null;\n $this->id_ruang = null;\n $this->hari = null;\n $this->bel_ke_01 = null;\n $this->bel_ke_02 = null;\n $this->bel_ke_03 = null;\n $this->bel_ke_04 = null;\n $this->bel_ke_05 = null;\n $this->bel_ke_06 = null;\n $this->bel_ke_07 = null;\n $this->bel_ke_08 = null;\n $this->bel_ke_09 = null;\n $this->bel_ke_10 = null;\n $this->bel_ke_11 = null;\n $this->bel_ke_12 = null;\n $this->bel_ke_13 = null;\n $this->bel_ke_14 = null;\n $this->bel_ke_15 = null;\n $this->bel_ke_16 = null;\n $this->bel_ke_17 = null;\n $this->bel_ke_18 = null;\n $this->bel_ke_19 = null;\n $this->bel_ke_20 = null;\n $this->create_date = null;\n $this->last_update = null;\n $this->soft_delete = null;\n $this->last_sync = null;\n $this->updater_id = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearShoppingCarts()\n\t{\n\t\t$this->collShoppingCarts = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clear()\n {\n $this->shnttype = null;\n $this->shnttypedesc = null;\n $this->oehhnbr = null;\n $this->shntyear = null;\n $this->oedhline = null;\n $this->shntlotser = null;\n $this->shntpickticket = null;\n $this->shntpackticket = null;\n $this->shntinvoice = null;\n $this->shntacknow = null;\n $this->shntseq = null;\n $this->shntnote = null;\n $this->shntkey2 = null;\n $this->shntform = null;\n $this->dateupdtd = null;\n $this->timeupdtd = null;\n $this->dummy = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearRatings()\n {\n $this->collRatings = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clear() : CollectionInterface;", "public function clear()\n\t{\n\t\t$this->co_usuario = null;\n\t\t$this->nu_cpf = null;\n\t\t$this->ds_password = null;\n\t\t$this->no_usuario = null;\n\t\t$this->ds_login = null;\n\t\t$this->dt_ultimo_login = null;\n\t\t$this->ds_email = null;\n\t\t$this->co_perfil = null;\n\t\t$this->nu_celular = null;\n\t\t$this->nu_telefone = null;\n\t\t$this->st_usuario = null;\n\t\t$this->alreadyInSave = false;\n\t\t$this->alreadyInValidation = false;\n\t\t$this->clearAllReferences();\n\t\t$this->applyDefaultValues();\n\t\t$this->resetModified();\n\t\t$this->setNew(true);\n\t\t$this->setDeleted(false);\n\t}", "private function clear()\n {\n $this->mappedQueries = [];\n $this->mappedFilters = [];\n $this->requestData = [];\n }", "public function clear()\n {\n if (null !== $this->auserSysRef) {\n $this->auserSysRef->removeIssues($this);\n }\n if (null !== $this->aBooks) {\n $this->aBooks->removeIssues($this);\n }\n $this->id = null;\n $this->_name = null;\n $this->_opendate = null;\n $this->_closedate = null;\n $this->_status = null;\n $this->_infotext = null;\n $this->_forbook = null;\n $this->__user__ = null;\n $this->__config__ = null;\n $this->__split__ = null;\n $this->__parentnode__ = null;\n $this->__sort__ = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }" ]
[ "0.6750238", "0.6639179", "0.65198493", "0.6416884", "0.63867074", "0.6307864", "0.6274599", "0.6241243", "0.61812353", "0.61485565", "0.6132217", "0.607879", "0.60750383", "0.60667855", "0.604218", "0.60326314", "0.6023424", "0.59935606", "0.59800345", "0.5976338", "0.5965882", "0.5939288", "0.59248805", "0.5922895", "0.5920474", "0.588047", "0.5872484", "0.58715034", "0.5867303", "0.58653504" ]
0.7762139
0
Initializes the collOperationScenariis collection. By default this just sets the collOperationScenariis collection to an empty array (like clearcollOperationScenariis()); however, you may wish to override this method in your stub class to provide setting appropriate to your application for example, setting the initial array to the values stored in database.
public function initOperationScenariis($overrideExisting = true) { if (null !== $this->collOperationScenariis && !$overrideExisting) { return; } $this->collOperationScenariis = new PropelObjectCollection(); $this->collOperationScenariis->setModel('OperationScenarii'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOperationScenariis(PropelCollection $operationScenariis, PropelPDO $con = null)\n {\n $operationScenariisToDelete = $this->getOperationScenariis(new Criteria(), $con)->diff($operationScenariis);\n\n\n $this->operationScenariisScheduledForDeletion = $operationScenariisToDelete;\n\n foreach ($operationScenariisToDelete as $operationScenariiRemoved) {\n $operationScenariiRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationScenariis = null;\n foreach ($operationScenariis as $operationScenarii) {\n $this->addOperationScenarii($operationScenarii);\n }\n\n $this->collOperationScenariis = $operationScenariis;\n $this->collOperationScenariisPartial = false;\n\n return $this;\n }", "public function clearOperationScenariis()\n {\n $this->collOperationScenariis = null; // important to set this to null since that means it is uninitialized\n $this->collOperationScenariisPartial = null;\n\n return $this;\n }", "public function getOperationScenariis($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationScenariisPartial && !$this->isNew();\n if (null === $this->collOperationScenariis || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationScenariis) {\n // return empty collection\n $this->initOperationScenariis();\n } else {\n $collOperationScenariis = OperationScenariiQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collOperationScenariisPartial && count($collOperationScenariis)) {\n $this->initOperationScenariis(false);\n\n foreach ($collOperationScenariis as $obj) {\n if (false == $this->collOperationScenariis->contains($obj)) {\n $this->collOperationScenariis->append($obj);\n }\n }\n\n $this->collOperationScenariisPartial = true;\n }\n\n $collOperationScenariis->getInternalIterator()->rewind();\n\n return $collOperationScenariis;\n }\n\n if ($partial && $this->collOperationScenariis) {\n foreach ($this->collOperationScenariis as $obj) {\n if ($obj->isNew()) {\n $collOperationScenariis[] = $obj;\n }\n }\n }\n\n $this->collOperationScenariis = $collOperationScenariis;\n $this->collOperationScenariisPartial = false;\n }\n }\n\n return $this->collOperationScenariis;\n }", "public function initOperationPrestationss($overrideExisting = true)\n {\n if (null !== $this->collOperationPrestationss && !$overrideExisting) {\n return;\n }\n $this->collOperationPrestationss = new PropelObjectCollection();\n $this->collOperationPrestationss->setModel('OperationPrestations');\n }", "public function initialize()\n {\n $this->setSchema(\"cisystem\");\n }", "public function initRightss()\n {\n $this->collRightss = new ObjectCollection();\n $this->collRightssPartial = true;\n\n $this->collRightss->setModel('\\Rights');\n }", "public function initShoppingCarts()\n\t{\n\t\t$this->collShoppingCarts = array();\n\t}", "public function setOperationPrestationss(PropelCollection $operationPrestationss, PropelPDO $con = null)\n {\n $operationPrestationssToDelete = $this->getOperationPrestationss(new Criteria(), $con)->diff($operationPrestationss);\n\n\n $this->operationPrestationssScheduledForDeletion = $operationPrestationssToDelete;\n\n foreach ($operationPrestationssToDelete as $operationPrestationsRemoved) {\n $operationPrestationsRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationPrestationss = null;\n foreach ($operationPrestationss as $operationPrestations) {\n $this->addOperationPrestations($operationPrestations);\n }\n\n $this->collOperationPrestationss = $operationPrestationss;\n $this->collOperationPrestationssPartial = false;\n\n return $this;\n }", "public function initOpenids()\n\t{\n\t\t$this->collOpenids = array();\n\t}", "public function initialize()\n {\n if (is_null($this->images)) {\n $this->images = new ArrayCollection();\n }\n }", "public function init($universo, $solucao) {\r\n $this->universo = $universo;\r\n $this->solucao = $solucao;\r\n\r\n //itera atraves dos elementos do universo e avalia se a solucao consegue identificar algum.\r\n //$this->universo->elementos = $this->universo->elementos;\r\n // README: Enquanto no Java os objetos podem ser usados como indices de Array, o PHP Array tem limitacao para aceitar isso\r\n // Para contornar esse problema, sera usada a classe SplObjectStorage como \"array\" para armazenar os objetos no indice do array.\r\n // Reference: https://stackoverflow.com/questions/4642980/can-i-use-an-instantiated-object-as-an-array-key?lq=1\r\n\r\n $this->elemParticao = new SplObjectStorage();\r\n $this->elemResposta = new SplObjectStorage();\r\n $this->particoes = new SplObjectStorage();\r\n\r\n $estagios = $this->solucao->condicoes; //aqui nos representamos estagios em lugar de condicoes (como o icomb faz)\r\n\r\n foreach ($this->universo->elementos as $elemento) {\r\n foreach ($estagios as $estagio) {\r\n// print_r($estagio);\r\n if ($estagio->evaluate($elemento)) {\r\n\r\n $valor = $this->splSearchWithKey($this->elemParticao, $elemento);\r\n if (isset($valor)) {\r\n //throw new RuntimeException(I18n.getString(\"evaluationMessage01\"));\r\n die('evaluationMessage01');\r\n } else {\r\n\r\n $this->elemParticao[$elemento] = $estagio;\r\n\r\n $set = array();\r\n if (isset($this->particoes[$estagio])) {\r\n $set = $this->particoes[$estagio];\r\n }\r\n\r\n $set[] = $elemento;\r\n $this->particoes[$estagio] = $set;\r\n }\r\n }\r\n }\r\n }\r\n }", "public function _construct(){\n $this->KcsPoll = new ArrayCollection();\n }", "public function addOperationScenarii(OperationScenarii $l)\n {\n if ($this->collOperationScenariis === null) {\n $this->initOperationScenariis();\n $this->collOperationScenariisPartial = true;\n }\n\n if (!in_array($l, $this->collOperationScenariis->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddOperationScenarii($l);\n\n if ($this->operationScenariisScheduledForDeletion and $this->operationScenariisScheduledForDeletion->contains($l)) {\n $this->operationScenariisScheduledForDeletion->remove($this->operationScenariisScheduledForDeletion->search($l));\n }\n }\n\n return $this;\n }", "protected function init()\n {\n $this->totais = [\n 'liquidados' => 0,\n 'entradas' => 0,\n 'baixados' => 0,\n 'protestados' => 0,\n 'erros' => 0,\n 'alterados' => 0,\n ];\n }", "protected function init()\n {\n $this->totais = [\n 'liquidados' => 0,\n 'entradas' => 0,\n 'baixados' => 0,\n 'protestados' => 0,\n 'erros' => 0,\n 'alterados' => 0,\n ];\n }", "public function initRegions()\n {\n $this->collRegions = new PropelObjectCollection();\n $this->collRegions->setModel('Region');\n }", "public function initialize()\n {\n $this->setSchema(\"calculadoras\");\n $this->setSource(\"paises\");\n }", "public function __construct() {\n $this->disciplinas = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->tendencias = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->institucionalEstrategias = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->ofertas = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->estrategiaCampos = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->eventos = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->encuestas = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "public function initialize()\n {\n $this->setSchema(\"sistema\");\n $this->setSource(\"comentarios\");\n $this->belongsTo('id_usuario', '\\Usuarios', 'id_usuario', ['alias' => 'Usuarios']);\n $this->belongsTo('id_reporte', '\\Reporte', 'id_reporte', ['alias' => 'Reporte']);\n }", "function init($ArrDatos = false){\n\t\t$D = array();\n\t\tif( setNoMenorQueCero($this->mCodigo) <= 0 ){\n\t\t\t$this->mSocioIniciado\t\t= false;\n\t\t} else {\n\t\t\tif ($ArrDatos == false OR !is_array($ArrDatos) ){\n\t\t\t\t$sql = \"SELECT * FROM socios_general WHERE codigo=\" . $this->mCodigo . \" LIMIT 0,1\";\n\t\t\t\t$D\t\t= obten_filas($sql);\n\t\t\t} else {\n\t\t\t\t$D\t\t= $ArrDatos;\n\t\t\t}\n\t\t\tif(isset($D[\"codigo\"])){\n\t\t\t\t$xSoc\t\t= new cSocios_general();\n\t\t\t\t$xSoc->setData($D);\n\t\t\t\t/*\t\tfechaentrevista, fechaalta, estatusactual, region, cajalocal,\n\t\t\t\t,genero, eacp, observaciones, idusuario\n\t\t\t\t grupo_solidario, personalidad_juridica,\n\t\t\t\tregimen_conyugal, sucursal, fecha_de_revision */\n\t\t\t\t$this->mNombre\t\t\t\t= $D[\"nombrecompleto\"];\n\t\t\t\t$this->mApMaterno\t\t\t= $D[\"apellidomaterno\"];\n\t\t\t\t$this->mApPaterno\t\t\t= $D[\"apellidopaterno\"];\n\t\t\t\t$this->mTipoDeIngreso\t\t= $D[\"tipoingreso\"];\n\t\t\t\t$this->mEstadoCivil\t\t\t= $D[\"estadocivil\"];\n\t\t\t\t$this->mGrupoAsociado\t\t= $D[\"grupo_solidario\"];\n\t\t\t\t$this->mCajaLocal\t\t\t= $D[\"cajalocal\"];\n\t\t\t\t$this->mDependencia\t\t\t= $D[\"dependencia\"];\n\t\t\t\t$this->mRFC\t\t\t\t\t= $D[\"rfc\"];\n\t\t\t\t$this->mCURP\t\t\t\t= $D[\"curp\"];\n\t\t\t\t$this->mPropietario\t\t\t= $D[\"idusuario\"];\n\t\t\t\t$this->mFechaDeIngreso\t\t= $D[\"fechaalta\"];\n\t\t\t\t$this->mTipoDeIdent\t\t\t= $D[\"tipo_de_identificacion\"];\n\t\t\t\t$this->mNumeroDeIdent\t\t= $D[\"documento_de_identificacion\"];\n\t\t\t\t$this->mEmail\t\t\t\t= $D[\"correo_electronico\"];\n\t\t\t\t$this->mTelefonoP\t\t\t= $D[\"telefono_principal\"];\n\t\t\t\t$this->mDependientes\t\t= $D[\"dependientes_economicos\"];\n\t\t\t\t$this->mSucursal\t\t\t= $D[\"sucursal\"];\n\t\t\t\t//Agrega Valores de array pedidos\n\t\t\t\t$D[\"fecha_de_nacimiento\"]\t= $D[\"fechanacimiento\"];\n\t\t\t\t$D[\"codigo_de_socio\"]\t\t= $D[\"codigo\"];\n\t\t\t\t$this->mFechaDeNacimiento\t= $D[\"fechanacimiento\"];\n\t\t\t\t$this->mTipoFiguraJu\t\t= $D[\"personalidad_juridica\"];\n\t\t\t\t$this->mLugarDeNacimiento\t= $D[\"lugarnacimiento\"];\n\t\t\t\t$this->mTituloPersona\t\t= $xSoc->titulo_personal()->v();\n\t\t\t\t$this->mPaisDeOrigen\t\t= strtoupper($xSoc->pais_de_origen()->v(OUT_TXT));\n\t\t\t\t$this->mGenero\t\t\t\t= $xSoc->genero()->v();\n\t\t\t\t$this->mNivelDeRiesgo\t\t= $xSoc->nivel_de_riesgo_aml()->v();\n\t\t\t\t$this->mObservaciones\t\t= $xSoc->observaciones()->v(OUT_TXT);\n\t\t\t\t$this->mEstadoActual\t\t= $xSoc->estatusactual()->v();\n\t\t\t\t//\n\t\t\t\t$this->mDSocioByArray\t\t= $D;\n\t\t\t\t//return\t$D;\n\t\t\t\t$this->mSocioIniciado\t\t= true;\n\t\t\t}\n\t\t}\n\t\tif($this->mSocioIniciado == false){ $this->mMessages\t.= \"ERROR\\tAl Iniciar a la persona : \" . $this->mCodigo . \"\\r\\n\";}\n\t\treturn $this->mSocioIniciado;\n\t}", "public function __construct()\n {\n $this->placas = new ArrayCollection();\n }", "public function __construct()\n {\n $this->recepten = new ArrayCollection();\n }", "public function init()\n {\n $this->bases = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "public function initialize()\n {\n $this->setSchema(\"sistema\");\n $this->setSource(\"rol\");\n $this->hasMany('id_rol', 'Usuarios', 'id_rol', ['alias' => 'Usuarios']);\n }", "public function __construct() {\n $this->bestellijn = new ArrayCollection();\n }", "protected function initRoles()\n {\n $this->roles = new ArrayCollection();\n }", "public function initVpoRequestCargos()\n\t{\n\t\t$this->collVpoRequestCargos = array();\n\t}", "public function initColetaPesquisas($overrideExisting = true)\n\t{\n\t\tif (null !== $this->collColetaPesquisas && !$overrideExisting) {\n\t\t\treturn;\n\t\t}\n\t\t$this->collColetaPesquisas = new PropelObjectCollection();\n\t\t$this->collColetaPesquisas->setModel('ColetaPesquisa');\n\t}", "public function initQuestions()\n\t{\n\t\t$this->collQuestions = array();\n\t}", "public function getCodigoSucursalSII()\n {\n return $this->codigoSucursalSII;\n }" ]
[ "0.7024721", "0.5935696", "0.5555607", "0.55048114", "0.5274908", "0.520496", "0.5170482", "0.516791", "0.5073825", "0.5029846", "0.49778882", "0.49626476", "0.49363145", "0.4904427", "0.48997408", "0.48211908", "0.47973523", "0.4793396", "0.47741362", "0.47221175", "0.47162274", "0.46969515", "0.46964756", "0.46894386", "0.46893936", "0.4681344", "0.4625747", "0.46032313", "0.45803335", "0.45703092" ]
0.7022886
1
Gets an array of OperationScenarii objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the cached collection is returned. If this OperationPrimes is new, it will return an empty collection or the current collection; the criteria is ignored on a new object.
public function getOperationScenariis($criteria = null, PropelPDO $con = null) { $partial = $this->collOperationScenariisPartial && !$this->isNew(); if (null === $this->collOperationScenariis || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collOperationScenariis) { // return empty collection $this->initOperationScenariis(); } else { $collOperationScenariis = OperationScenariiQuery::create(null, $criteria) ->filterByOperationPrimes($this) ->find($con); if (null !== $criteria) { if (false !== $this->collOperationScenariisPartial && count($collOperationScenariis)) { $this->initOperationScenariis(false); foreach ($collOperationScenariis as $obj) { if (false == $this->collOperationScenariis->contains($obj)) { $this->collOperationScenariis->append($obj); } } $this->collOperationScenariisPartial = true; } $collOperationScenariis->getInternalIterator()->rewind(); return $collOperationScenariis; } if ($partial && $this->collOperationScenariis) { foreach ($this->collOperationScenariis as $obj) { if ($obj->isNew()) { $collOperationScenariis[] = $obj; } } } $this->collOperationScenariis = $collOperationScenariis; $this->collOperationScenariisPartial = false; } } return $this->collOperationScenariis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n // return empty collection\n $this->initLnkOperationPrimeRCountriess();\n } else {\n $collLnkOperationPrimeRCountriess = LnkOperationPrimeRCountriesQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collLnkOperationPrimeRCountriessPartial && count($collLnkOperationPrimeRCountriess)) {\n $this->initLnkOperationPrimeRCountriess(false);\n\n foreach ($collLnkOperationPrimeRCountriess as $obj) {\n if (false == $this->collLnkOperationPrimeRCountriess->contains($obj)) {\n $this->collLnkOperationPrimeRCountriess->append($obj);\n }\n }\n\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n $collLnkOperationPrimeRCountriess->getInternalIterator()->rewind();\n\n return $collLnkOperationPrimeRCountriess;\n }\n\n if ($partial && $this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $obj) {\n if ($obj->isNew()) {\n $collLnkOperationPrimeRCountriess[] = $obj;\n }\n }\n }\n\n $this->collLnkOperationPrimeRCountriess = $collLnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n }\n }\n\n return $this->collLnkOperationPrimeRCountriess;\n }", "public function getOperationPrestationss($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationPrestationssPartial && !$this->isNew();\n if (null === $this->collOperationPrestationss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationPrestationss) {\n // return empty collection\n $this->initOperationPrestationss();\n } else {\n $collOperationPrestationss = OperationPrestationsQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collOperationPrestationssPartial && count($collOperationPrestationss)) {\n $this->initOperationPrestationss(false);\n\n foreach ($collOperationPrestationss as $obj) {\n if (false == $this->collOperationPrestationss->contains($obj)) {\n $this->collOperationPrestationss->append($obj);\n }\n }\n\n $this->collOperationPrestationssPartial = true;\n }\n\n $collOperationPrestationss->getInternalIterator()->rewind();\n\n return $collOperationPrestationss;\n }\n\n if ($partial && $this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $obj) {\n if ($obj->isNew()) {\n $collOperationPrestationss[] = $obj;\n }\n }\n }\n\n $this->collOperationPrestationss = $collOperationPrestationss;\n $this->collOperationPrestationssPartial = false;\n }\n }\n\n return $this->collOperationPrestationss;\n }", "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n\n return $criteria;\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_ID)) $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n if ($this->isColumnModified(OperationPrimesPeer::OP_ID)) $criteria->add(OperationPrimesPeer::OP_ID, $this->op_id);\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_LIBELLE)) $criteria->add(OperationPrimesPeer::OP_PRIME_LIBELLE, $this->op_prime_libelle);\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_NUMERO)) $criteria->add(OperationPrimesPeer::OP_PRIME_NUMERO, $this->op_prime_numero);\n if ($this->isColumnModified(OperationPrimesPeer::GDL_ART_ID)) $criteria->add(OperationPrimesPeer::GDL_ART_ID, $this->gdl_art_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID, $this->operation_prime_currency_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID, $this->operation_prime_r_reward_type_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID, $this->operation_prime_r_reward_expedition_mode_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID, $this->operation_prime_r_reward_transporter_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT, $this->operation_prime_fixed_amount);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE, $this->operation_prime_product_price_pourcentage);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT, $this->operation_prime_maximum_amount);\n\n return $criteria;\n }", "public function getContributionss(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collContributionssPartial && !$this->isNew();\n if (null === $this->collContributionss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collContributionss) {\n // return empty collection\n $this->initContributionss();\n } else {\n $collContributionss = ChildContributionsQuery::create(null, $criteria)\n ->filterByIssues($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collContributionssPartial && count($collContributionss)) {\n $this->initContributionss(false);\n\n foreach ($collContributionss as $obj) {\n if (false == $this->collContributionss->contains($obj)) {\n $this->collContributionss->append($obj);\n }\n }\n\n $this->collContributionssPartial = true;\n }\n\n return $collContributionss;\n }\n\n if ($partial && $this->collContributionss) {\n foreach ($this->collContributionss as $obj) {\n if ($obj->isNew()) {\n $collContributionss[] = $obj;\n }\n }\n }\n\n $this->collContributionss = $collContributionss;\n $this->collContributionssPartial = false;\n }\n }\n\n return $this->collContributionss;\n }", "public function getCMDPieces(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCMDPiecesPartial && !$this->isNew();\n if (null === $this->collCMDPieces || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCMDPieces) {\n // return empty collection\n $this->initCMDPieces();\n } else {\n $collCMDPieces = ChildCMDPieceQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCMDPiecesPartial && count($collCMDPieces)) {\n $this->initCMDPieces(false);\n\n foreach ($collCMDPieces as $obj) {\n if (false == $this->collCMDPieces->contains($obj)) {\n $this->collCMDPieces->append($obj);\n }\n }\n\n $this->collCMDPiecesPartial = true;\n }\n\n return $collCMDPieces;\n }\n\n if ($partial && $this->collCMDPieces) {\n foreach ($this->collCMDPieces as $obj) {\n if ($obj->isNew()) {\n $collCMDPieces[] = $obj;\n }\n }\n }\n\n $this->collCMDPieces = $collCMDPieces;\n $this->collCMDPiecesPartial = false;\n }\n }\n\n return $this->collCMDPieces;\n }", "public function relCooperations() {\n return Job::query()\n ->join('ownership', 'ownership.tobjsid', 'jobs.sId')\n ->select('jobs.*')\n ->where('ownership.fobjsid', parent::__get('sId'))\n ->where('jobs.type', Job::TYPE_COOPERATION)\n ->get();\n }", "public function getCOMConditions(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCOMConditionsPartial && !$this->isNew();\n if (null === $this->collCOMConditions || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCOMConditions) {\n // return empty collection\n $this->initCOMConditions();\n } else {\n $collCOMConditions = ChildCOMConditionQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCOMConditionsPartial && count($collCOMConditions)) {\n $this->initCOMConditions(false);\n\n foreach ($collCOMConditions as $obj) {\n if (false == $this->collCOMConditions->contains($obj)) {\n $this->collCOMConditions->append($obj);\n }\n }\n\n $this->collCOMConditionsPartial = true;\n }\n\n return $collCOMConditions;\n }\n\n if ($partial && $this->collCOMConditions) {\n foreach ($this->collCOMConditions as $obj) {\n if ($obj->isNew()) {\n $collCOMConditions[] = $obj;\n }\n }\n }\n\n $this->collCOMConditions = $collCOMConditions;\n $this->collCOMConditionsPartial = false;\n }\n }\n\n return $this->collCOMConditions;\n }", "public function getColetaPesquisas($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collColetaPesquisas || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collColetaPesquisas) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initColetaPesquisas();\n\t\t\t} else {\n\t\t\t\t$collColetaPesquisas = ColetaPesquisaQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collColetaPesquisas;\n\t\t\t\t}\n\t\t\t\t$this->collColetaPesquisas = $collColetaPesquisas;\n\t\t\t}\n\t\t}\n\t\treturn $this->collColetaPesquisas;\n\t}", "public function getCriteria()\n\t{\n\t\treturn $this->criteria;\n\t}", "public function getFeatureCvtermprops($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collFeatureCvtermpropsPartial && !$this->isNew();\n if (null === $this->collFeatureCvtermprops || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collFeatureCvtermprops) {\n // return empty collection\n $this->initFeatureCvtermprops();\n } else {\n $collFeatureCvtermprops = FeatureCvtermpropQuery::create(null, $criteria)\n ->filterByFeatureCvterm($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collFeatureCvtermpropsPartial && count($collFeatureCvtermprops)) {\n $this->initFeatureCvtermprops(false);\n\n foreach($collFeatureCvtermprops as $obj) {\n if (false == $this->collFeatureCvtermprops->contains($obj)) {\n $this->collFeatureCvtermprops->append($obj);\n }\n }\n\n $this->collFeatureCvtermpropsPartial = true;\n }\n\n $collFeatureCvtermprops->getInternalIterator()->rewind();\n return $collFeatureCvtermprops;\n }\n\n if($partial && $this->collFeatureCvtermprops) {\n foreach($this->collFeatureCvtermprops as $obj) {\n if($obj->isNew()) {\n $collFeatureCvtermprops[] = $obj;\n }\n }\n }\n\n $this->collFeatureCvtermprops = $collFeatureCvtermprops;\n $this->collFeatureCvtermpropsPartial = false;\n }\n }\n\n return $this->collFeatureCvtermprops;\n }", "public function getCriteria()\n {\n return $this->criteria;\n }", "public function getCriteria()\n {\n return $this->criteria;\n }", "public function get_criteria() { return $this->criteria_list; }", "public function getCOMVendeurs(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCOMVendeursPartial && !$this->isNew();\n if (null === $this->collCOMVendeurs || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCOMVendeurs) {\n // return empty collection\n $this->initCOMVendeurs();\n } else {\n $collCOMVendeurs = ChildCOMVendeurQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCOMVendeursPartial && count($collCOMVendeurs)) {\n $this->initCOMVendeurs(false);\n\n foreach ($collCOMVendeurs as $obj) {\n if (false == $this->collCOMVendeurs->contains($obj)) {\n $this->collCOMVendeurs->append($obj);\n }\n }\n\n $this->collCOMVendeursPartial = true;\n }\n\n return $collCOMVendeurs;\n }\n\n if ($partial && $this->collCOMVendeurs) {\n foreach ($this->collCOMVendeurs as $obj) {\n if ($obj->isNew()) {\n $collCOMVendeurs[] = $obj;\n }\n }\n }\n\n $this->collCOMVendeurs = $collCOMVendeurs;\n $this->collCOMVendeursPartial = false;\n }\n }\n\n return $this->collCOMVendeurs;\n }", "public function getPesquisas($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collPesquisas || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collPesquisas) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initPesquisas();\n\t\t\t} else {\n\t\t\t\t$collPesquisas = PesquisaQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collPesquisas;\n\t\t\t\t}\n\t\t\t\t$this->collPesquisas = $collPesquisas;\n\t\t\t}\n\t\t}\n\t\treturn $this->collPesquisas;\n\t}", "public function getCriteria(){\n return $this->criteria;\n }", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(C060InventarioPeer::DATABASE_NAME);\n\n\t\t$criteria->add(C060InventarioPeer::CO_NUM_INVENTARIO, $this->co_num_inventario);\n\n\t\treturn $criteria;\n\t}", "public function getPermissaosRelatedByCoUsuarioAlteracao($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collPermissaosRelatedByCoUsuarioAlteracao || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collPermissaosRelatedByCoUsuarioAlteracao) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initPermissaosRelatedByCoUsuarioAlteracao();\n\t\t\t} else {\n\t\t\t\t$collPermissaosRelatedByCoUsuarioAlteracao = PermissaoQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuarioRelatedByCoUsuarioAlteracao($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collPermissaosRelatedByCoUsuarioAlteracao;\n\t\t\t\t}\n\t\t\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = $collPermissaosRelatedByCoUsuarioAlteracao;\n\t\t\t}\n\t\t}\n\t\treturn $this->collPermissaosRelatedByCoUsuarioAlteracao;\n\t}", "public static function cooperations() {\n return self::query()\n ->join('ownership', 'ownership.fobjsid', 'vp.sId')\n ->join('jobs', 'ownership.tobjsid', 'jobs.sId')\n ->select('vp.*')\n ->where('jobs.type', Job::TYPE_COOPERATION);\n }", "public function getRIssuesAllplugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collRIssuesAllpluginsPartial && !$this->isNew();\n if (null === $this->collRIssuesAllplugins || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collRIssuesAllplugins) {\n // return empty collection\n $this->initRIssuesAllplugins();\n } else {\n $collRIssuesAllplugins = ChildRIssuesAllpluginQuery::create(null, $criteria)\n ->filterByAllIssue($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collRIssuesAllpluginsPartial && count($collRIssuesAllplugins)) {\n $this->initRIssuesAllplugins(false);\n\n foreach ($collRIssuesAllplugins as $obj) {\n if (false == $this->collRIssuesAllplugins->contains($obj)) {\n $this->collRIssuesAllplugins->append($obj);\n }\n }\n\n $this->collRIssuesAllpluginsPartial = true;\n }\n\n return $collRIssuesAllplugins;\n }\n\n if ($partial && $this->collRIssuesAllplugins) {\n foreach ($this->collRIssuesAllplugins as $obj) {\n if ($obj->isNew()) {\n $collRIssuesAllplugins[] = $obj;\n }\n }\n }\n\n $this->collRIssuesAllplugins = $collRIssuesAllplugins;\n $this->collRIssuesAllpluginsPartial = false;\n }\n }\n\n return $this->collRIssuesAllplugins;\n }", "public function getCriteria()\n {\n return isset($this->criteria) ? $this->criteria : null;\n }", "public function getVpoRequestCargos($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(VpoRequestPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collVpoRequestCargos === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collVpoRequestCargos = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(VpoRequestCargoPeer::REQUEST_ID, $this->id);\n\n\t\t\t\tVpoRequestCargoPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collVpoRequestCargos = VpoRequestCargoPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(VpoRequestCargoPeer::REQUEST_ID, $this->id);\n\n\t\t\t\tVpoRequestCargoPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastVpoRequestCargoCriteria) || !$this->lastVpoRequestCargoCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collVpoRequestCargos = VpoRequestCargoPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastVpoRequestCargoCriteria = $criteria;\n\t\treturn $this->collVpoRequestCargos;\n\t}", "public function getRIssuesSingleplugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collRIssuesSinglepluginsPartial && !$this->isNew();\n if (null === $this->collRIssuesSingleplugins || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collRIssuesSingleplugins) {\n // return empty collection\n $this->initRIssuesSingleplugins();\n } else {\n $collRIssuesSingleplugins = ChildRIssuesSinglepluginQuery::create(null, $criteria)\n ->filterBySingleIssue($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collRIssuesSinglepluginsPartial && count($collRIssuesSingleplugins)) {\n $this->initRIssuesSingleplugins(false);\n\n foreach ($collRIssuesSingleplugins as $obj) {\n if (false == $this->collRIssuesSingleplugins->contains($obj)) {\n $this->collRIssuesSingleplugins->append($obj);\n }\n }\n\n $this->collRIssuesSinglepluginsPartial = true;\n }\n\n return $collRIssuesSingleplugins;\n }\n\n if ($partial && $this->collRIssuesSingleplugins) {\n foreach ($this->collRIssuesSingleplugins as $obj) {\n if ($obj->isNew()) {\n $collRIssuesSingleplugins[] = $obj;\n }\n }\n }\n\n $this->collRIssuesSingleplugins = $collRIssuesSingleplugins;\n $this->collRIssuesSinglepluginsPartial = false;\n }\n }\n\n return $this->collRIssuesSingleplugins;\n }", "public function getRIssuesXmlplugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collRIssuesXmlpluginsPartial && !$this->isNew();\n if (null === $this->collRIssuesXmlplugins || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collRIssuesXmlplugins) {\n // return empty collection\n $this->initRIssuesXmlplugins();\n } else {\n $collRIssuesXmlplugins = ChildRIssuesXmlpluginQuery::create(null, $criteria)\n ->filterByXmlIssue($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collRIssuesXmlpluginsPartial && count($collRIssuesXmlplugins)) {\n $this->initRIssuesXmlplugins(false);\n\n foreach ($collRIssuesXmlplugins as $obj) {\n if (false == $this->collRIssuesXmlplugins->contains($obj)) {\n $this->collRIssuesXmlplugins->append($obj);\n }\n }\n\n $this->collRIssuesXmlpluginsPartial = true;\n }\n\n return $collRIssuesXmlplugins;\n }\n\n if ($partial && $this->collRIssuesXmlplugins) {\n foreach ($this->collRIssuesXmlplugins as $obj) {\n if ($obj->isNew()) {\n $collRIssuesXmlplugins[] = $obj;\n }\n }\n }\n\n $this->collRIssuesXmlplugins = $collRIssuesXmlplugins;\n $this->collRIssuesXmlpluginsPartial = false;\n }\n }\n\n return $this->collRIssuesXmlplugins;\n }", "public function getInappropriates($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PostPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collInappropriates === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collInappropriates = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(InappropriatePeer::POST_ID, $this->id);\n\n\t\t\t\tInappropriatePeer::addSelectColumns($criteria);\n\t\t\t\t$this->collInappropriates = InappropriatePeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(InappropriatePeer::POST_ID, $this->id);\n\n\t\t\t\tInappropriatePeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastInappropriateCriteria) || !$this->lastInappropriateCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collInappropriates = InappropriatePeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastInappropriateCriteria = $criteria;\n\t\treturn $this->collInappropriates;\n\t}", "public function getClips($criteria)\n {\n }", "public function getPermissaosRelatedByCoUsuarioCadastro($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collPermissaosRelatedByCoUsuarioCadastro || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collPermissaosRelatedByCoUsuarioCadastro) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initPermissaosRelatedByCoUsuarioCadastro();\n\t\t\t} else {\n\t\t\t\t$collPermissaosRelatedByCoUsuarioCadastro = PermissaoQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuarioRelatedByCoUsuarioCadastro($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collPermissaosRelatedByCoUsuarioCadastro;\n\t\t\t\t}\n\t\t\t\t$this->collPermissaosRelatedByCoUsuarioCadastro = $collPermissaosRelatedByCoUsuarioCadastro;\n\t\t\t}\n\t\t}\n\t\treturn $this->collPermissaosRelatedByCoUsuarioCadastro;\n\t}", "public function getShoppingCarts($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(UserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collShoppingCarts === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collShoppingCarts = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(ShoppingCartPeer::USER_ID, $this->id);\n\n\t\t\t\tShoppingCartPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collShoppingCarts = ShoppingCartPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(ShoppingCartPeer::USER_ID, $this->id);\n\n\t\t\t\tShoppingCartPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastShoppingCartCriteria) || !$this->lastShoppingCartCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collShoppingCarts = ShoppingCartPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastShoppingCartCriteria = $criteria;\n\t\treturn $this->collShoppingCarts;\n\t}", "public function getPremios($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collPremios || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collPremios) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initPremios();\n\t\t\t} else {\n\t\t\t\t$collPremios = PremioQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collPremios;\n\t\t\t\t}\n\t\t\t\t$this->collPremios = $collPremios;\n\t\t\t}\n\t\t}\n\t\treturn $this->collPremios;\n\t}" ]
[ "0.67946124", "0.6406716", "0.6288889", "0.6235915", "0.59735477", "0.59352905", "0.567421", "0.556548", "0.550335", "0.5485317", "0.54754704", "0.54493105", "0.54493105", "0.5385212", "0.53807765", "0.5379429", "0.53694385", "0.53662443", "0.536164", "0.5353145", "0.53432184", "0.53329897", "0.5331228", "0.5308466", "0.53037775", "0.52861863", "0.5250622", "0.51952964", "0.51927847", "0.5190729" ]
0.7598169
0
Sets a collection of OperationScenarii objects related by a onetomany relationship to the current object. It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.
public function setOperationScenariis(PropelCollection $operationScenariis, PropelPDO $con = null) { $operationScenariisToDelete = $this->getOperationScenariis(new Criteria(), $con)->diff($operationScenariis); $this->operationScenariisScheduledForDeletion = $operationScenariisToDelete; foreach ($operationScenariisToDelete as $operationScenariiRemoved) { $operationScenariiRemoved->setOperationPrimes(null); } $this->collOperationScenariis = null; foreach ($operationScenariis as $operationScenarii) { $this->addOperationScenarii($operationScenarii); } $this->collOperationScenariis = $operationScenariis; $this->collOperationScenariisPartial = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRelations(Collection $relations);", "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collOperationScenariis) {\n foreach ($this->collOperationScenariis as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aOperations instanceof Persistent) {\n $this->aOperations->clearAllReferences($deep);\n }\n if ($this->aRCurrencies instanceof Persistent) {\n $this->aRCurrencies->clearAllReferences($deep);\n }\n if ($this->aRRewardTypes instanceof Persistent) {\n $this->aRRewardTypes->clearAllReferences($deep);\n }\n if ($this->aRRewardExpeditionModes instanceof Persistent) {\n $this->aRRewardExpeditionModes->clearAllReferences($deep);\n }\n if ($this->aRRewardTransporters instanceof Persistent) {\n $this->aRRewardTransporters->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collOperationPrestationss instanceof PropelCollection) {\n $this->collOperationPrestationss->clearIterator();\n }\n $this->collOperationPrestationss = null;\n if ($this->collOperationScenariis instanceof PropelCollection) {\n $this->collOperationScenariis->clearIterator();\n }\n $this->collOperationScenariis = null;\n if ($this->collLnkOperationPrimeRCountriess instanceof PropelCollection) {\n $this->collLnkOperationPrimeRCountriess->clearIterator();\n }\n $this->collLnkOperationPrimeRCountriess = null;\n $this->aOperations = null;\n $this->aRCurrencies = null;\n $this->aRRewardTypes = null;\n $this->aRRewardExpeditionModes = null;\n $this->aRRewardTransporters = null;\n }", "public function setRelations() {}", "public function setOperationPrestationss(PropelCollection $operationPrestationss, PropelPDO $con = null)\n {\n $operationPrestationssToDelete = $this->getOperationPrestationss(new Criteria(), $con)->diff($operationPrestationss);\n\n\n $this->operationPrestationssScheduledForDeletion = $operationPrestationssToDelete;\n\n foreach ($operationPrestationssToDelete as $operationPrestationsRemoved) {\n $operationPrestationsRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationPrestationss = null;\n foreach ($operationPrestationss as $operationPrestations) {\n $this->addOperationPrestations($operationPrestations);\n }\n\n $this->collOperationPrestationss = $operationPrestationss;\n $this->collOperationPrestationssPartial = false;\n\n return $this;\n }", "public function afterSave(){\r\n parent::afterSave();\r\n if($this->isNewRecord){\r\n $class = Strategy::getClass('Aro');\r\n $aro = new $class();\r\n $aro->model = get_class($this);\r\n $aro->foreign_key = $this->getPrimaryKey();\r\n if(!$aro->save())\r\n throw new RuntimeError(\"Unable to save Aro-Collection\");\r\n }\r\n }", "private function desabilitaPoolIdsObjetosManipulados()\n {\n \t// setando para null o atributo _arrayObjetosManipulados\n \t$this->_arrayObjetosManipulados = null;\n }", "public function setActions(PropelCollection $actions, PropelPDO $con = null)\n {\n $actionsToDelete = $this->getActions(new Criteria(), $con)->diff($actions);\n\n $this->actionsScheduledForDeletion = unserialize(serialize($actionsToDelete));\n\n foreach ($actionsToDelete as $actionRemoved) {\n $actionRemoved->setActionType(null);\n }\n\n $this->collActions = null;\n foreach ($actions as $action) {\n $this->addAction($action);\n }\n\n $this->collActions = $actions;\n $this->collActionsPartial = false;\n\n return $this;\n }", "public function setSolicitacaoResgatesRelatedBySolicitanteId(PropelCollection $solicitacaoResgatesRelatedBySolicitanteId, PropelPDO $con = null)\n\t{\n\t\t$this->solicitacaoResgatesRelatedBySolicitanteIdScheduledForDeletion = $this->getSolicitacaoResgatesRelatedBySolicitanteId(new Criteria(), $con)->diff($solicitacaoResgatesRelatedBySolicitanteId);\n\n\t\tforeach ($solicitacaoResgatesRelatedBySolicitanteId as $solicitacaoResgateRelatedBySolicitanteId) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($solicitacaoResgateRelatedBySolicitanteId->isNew()) {\n\t\t\t\t$solicitacaoResgateRelatedBySolicitanteId->setUsuarioRelatedBySolicitanteId($this);\n\t\t\t}\n\t\t\t$this->addSolicitacaoResgateRelatedBySolicitanteId($solicitacaoResgateRelatedBySolicitanteId);\n\t\t}\n\n\t\t$this->collSolicitacaoResgatesRelatedBySolicitanteId = $solicitacaoResgatesRelatedBySolicitanteId;\n\t}", "public function setRatings(Collection $ratings, ConnectionInterface $con = null)\n {\n /** @var ChildRating[] $ratingsToDelete */\n $ratingsToDelete = $this->getRatings(new Criteria(), $con)->diff($ratings);\n\n\n //since at least one column in the foreign key is at the same time a PK\n //we can not just set a PK to NULL in the lines below. We have to store\n //a backup of all values, so we are able to manipulate these items based on the onDelete value later.\n $this->ratingsScheduledForDeletion = clone $ratingsToDelete;\n\n foreach ($ratingsToDelete as $ratingRemoved) {\n $ratingRemoved->setArticle(null);\n }\n\n $this->collRatings = null;\n foreach ($ratings as $rating) {\n $this->addRating($rating);\n }\n\n $this->collRatings = $ratings;\n $this->collRatingsPartial = false;\n\n return $this;\n }", "public function computeChangeSets()\n {\n $this->computeScheduleInsertsChangeSets();\n\n // Compute changes for other MANAGED documents. Change tracking policies take effect here.\n foreach ($this->identityMap as $className => $documents) {\n $class = $this->dm->getClassMetadata($className);\n if($class->isEmbeddedDocument) {\n // Embedded documents should only compute by the document itself which include the embedded document.\n // This is done separately later.\n // @see computeChangeSet()\n // @see computeAssociationChanges()\n continue;\n }\n\n // If change tracking is explicit or happens through notification, then only compute\n // changes on documents of that type that are explicitly marked for synchronization.\n $documentsToProcess = ! $class->isChangeTrackingDeferredImplicit() ?\n (isset($this->scheduledForDirtyCheck[$className]) ?\n $this->scheduledForDirtyCheck[$className] : array())\n : $documents;\n\n foreach ($documentsToProcess as $document) {\n // Ignore uninitialized proxy objects\n if (/* $document is readOnly || */ $document instanceof Proxy && ! $document->__isInitialized__) {\n continue;\n }\n // Only MANAGED documents that are NOT SCHEDULED FOR INSERTION are processed here.\n $oid = spl_object_hash($document);\n if ( ! isset($this->documentInsertions[$oid]) && isset($this->documentStates[$oid])) {\n $this->computeChangeSet($class, $document);\n }\n }\n }\n }", "protected function addActionsForRelatedEntities()\n {\n if (! $this->mapper) {\n return;\n }\n\n foreach ($this->mapper->getRelations() as $name) {\n $this->mapper->getRelation($name)->addActions($this);\n }\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function setRuangs(PropelCollection $ruangs, PropelPDO $con = null)\n {\n $ruangsToDelete = $this->getRuangs(new Criteria(), $con)->diff($ruangs);\n\n $this->ruangsScheduledForDeletion = unserialize(serialize($ruangsToDelete));\n\n foreach ($ruangsToDelete as $ruangRemoved) {\n $ruangRemoved->setBangunan(null);\n }\n\n $this->collRuangs = null;\n foreach ($ruangs as $ruang) {\n $this->addRuang($ruang);\n }\n\n $this->collRuangs = $ruangs;\n $this->collRuangsPartial = false;\n\n return $this;\n }", "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete;\n\n foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) {\n $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null);\n }\n\n $this->collLnkOperationPrimeRCountriess = null;\n foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) {\n $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries);\n }\n\n $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n\n return $this;\n }", "public function setCriteriaCollection(CriteriaCollection $collection);", "public function afterSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE\n ) {\n // If set delete option.\n if (array_key_exists('delete', $rel) && $rel['delete'] === true) {\n // Find all related models with null ID link.\n $deleteModels = call_user_func($this->_settings[$rel['name']][1] . '::model')->findAllByAttributes(array($this->_settings[$rel['name']][2] => null));\n foreach ($deleteModels as $m) {\n $m->delete();\n }\n }\n }\n }\n }", "public function limpaArrayIdsObjetosManipulados()\n {\n \t// limpando o array de ids de objetos manipulados\n \t$this->_arrayObjetosManipulados = array();\n }", "public function setNoticias(PropelCollection $noticias, PropelPDO $con = null)\n\t{\n\t\t$this->noticiasScheduledForDeletion = $this->getNoticias(new Criteria(), $con)->diff($noticias);\n\n\t\tforeach ($noticias as $noticia) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($noticia->isNew()) {\n\t\t\t\t$noticia->setUsuario($this);\n\t\t\t}\n\t\t\t$this->addNoticia($noticia);\n\t\t}\n\n\t\t$this->collNoticias = $noticias;\n\t}", "public function resetCollectionsForPersist()\n {\n $this->containers = new ArrayCollection();\n $this->functions = new ArrayCollection();\n $this->constants = new ArrayCollection();\n }", "public function set()\n {\n\tforeach( $this->queue as $operation => $actions)\n\t{\n\t foreach($actions as $key => $action)\n\t {\n\t\tif ( is_array($action->sql))\n\t\t{\n\t\t array_walk($action->sql, array($this, 'query'));\n\t\t}\n\t\telse\n\t\t{\n\t\t $this->query($action->sql);\n\t\t}\n\t }\n\t}\n }", "public function setCOMConditions(Collection $cOMConditions, ConnectionInterface $con = null)\n {\n /** @var ChildCOMCondition[] $cOMConditionsToDelete */\n $cOMConditionsToDelete = $this->getCOMConditions(new Criteria(), $con)->diff($cOMConditions);\n\n\n //since at least one column in the foreign key is at the same time a PK\n //we can not just set a PK to NULL in the lines below. We have to store\n //a backup of all values, so we are able to manipulate these items based on the onDelete value later.\n $this->cOMConditionsScheduledForDeletion = clone $cOMConditionsToDelete;\n\n foreach ($cOMConditionsToDelete as $cOMConditionRemoved) {\n $cOMConditionRemoved->setCommande(null);\n }\n\n $this->collCOMConditions = null;\n foreach ($cOMConditions as $cOMCondition) {\n $this->addCOMCondition($cOMCondition);\n }\n\n $this->collCOMConditions = $cOMConditions;\n $this->collCOMConditionsPartial = false;\n\n return $this;\n }", "public function setCMDTAppareils(Collection $cMDTAppareils, ConnectionInterface $con = null)\n {\n /** @var ChildCMDTAppareil[] $cMDTAppareilsToDelete */\n $cMDTAppareilsToDelete = $this->getCMDTAppareils(new Criteria(), $con)->diff($cMDTAppareils);\n\n\n //since at least one column in the foreign key is at the same time a PK\n //we can not just set a PK to NULL in the lines below. We have to store\n //a backup of all values, so we are able to manipulate these items based on the onDelete value later.\n $this->cMDTAppareilsScheduledForDeletion = clone $cMDTAppareilsToDelete;\n\n foreach ($cMDTAppareilsToDelete as $cMDTAppareilRemoved) {\n $cMDTAppareilRemoved->setCommande(null);\n }\n\n $this->collCMDTAppareils = null;\n foreach ($cMDTAppareils as $cMDTAppareil) {\n $this->addCMDTAppareil($cMDTAppareil);\n }\n\n $this->collCMDTAppareils = $cMDTAppareils;\n $this->collCMDTAppareilsPartial = false;\n\n return $this;\n }", "private function computeScheduleInsertsChangeSets()\n {\n foreach ($this->documentInsertions as $document) {\n $class = $this->dm->getClassMetadata(get_class($document));\n\n $this->computeChangeSet($class, $document);\n }\n }", "protected function _updateNotification($collection)\n {\n foreach ($collection as $value) {\n $value->setAdminPendingNotification(0);\n $value->setId($value->getEntityId())->save();\n }\n }", "public function aRemoveAllFrom ($attribute, $logical = false)\n {\n // CHEK: attribute es un atributo hasMany\n\n // Si el rol tiene el nombre de la assoc declarado, necesito ver cual es el nombre\n // completo de la key en hasOne o hasMany porque usa attribute__assocName.\n $attribute = $this->getRoleWithAssocName( $attribute );\n\n // Verifica si la relacion hasMany esta cargada, y sino la carga\n $this->lazyLoadHasMany($attribute);\n\n // Aqui llega con la coleccion cargada o inicializada, siempre!\n // =================================================================\n\n // Si la coleccion no tiene elementos no hace nada.\n if ( count($this->attributeValues[$attribute]) == 0 ) return;\n \n // Aqui llega si hay elementos en la coleccion.\n // =================================================================\n\n $pm = PersistentManager::getInstance();\n\n // Busco en atributos hasMany attr y si encuentro elimino.\n foreach ( $this->attributeValues[$attribute] as $i => $obj )\n {\n // Saca de la relacion el objeto con id=$id\n $this->attributeValues[$attribute][$i] = null;\n $this->attributeValues[$attribute] = array_filter($this->attributeValues[$attribute]); // La forma PHP de hacerlo... array sin NULLs...\n\n // TODO: Verificar si el nombre de este atributo es el correcto!\n // Dado el otro objeto y mi atributo, quiero el atributo del otro objeto que corresponda a la relacion con mi atributo.\n $attr2 = $obj->getHasOneAttributeNameByAssocAttribute( get_class($this), $attribute );\n if ($attr2 == NULL) $attr2 = $obj->getHasManyAttributeNameByAssocAttribute( get_class($this), $attribute );\n // FIXME: Problema si el atributo es hasOne! no encuentra el nombre del atributo!\n // TODO: La operacion deberia ser para los 2 lados y ser tanto para n-n como para 1-n\n \n // Por defecto la asociacion se borra fisicamente.\n $pm->remove_assoc( $this, $obj, $attribute, $attr2, $logical ); // TODO: Ok ahora falta hacer que el get considere asociaciones solo con daleted false cuando carga.\n }\n \n $this->dirtyMany = true; // Marca como editado el hasMany\n \n }", "private function executeExtraUpdates()\n {\n foreach ($this->extraUpdates as $oid => $update) {\n list ($entity, $changeset) = $update;\n $this->entityChangeSets[$oid] = $changeset;\n $this->getEntityPersister(get_class($entity))->update($entity);\n }\n $this->extraUpdates = [];\n }", "public function beforeSave()\n {\n foreach ($this->relations as $rel) {\n if ($this->_settings[$rel['name']][0] === CActiveRecord::MANY_MANY ||\n $this->_settings[$rel['name']][0] === CActiveRecord::HAS_MANY\n ) {\n foreach ($this->owner->$rel['name'] as $m) {\n $m->save();\n }\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::HAS_ONE) {\n $this->owner->{$rel['name']}->save();\n } elseif ($this->_settings[$rel['name']][0] === CActiveRecord::BELONGS_TO) {\n if ($this->owner->$rel['name'] === null) {\n // Set link ID attribute of owner model as null.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], null);\n } else {\n // Save related model.\n $this->owner->{$rel['name']}->save();\n // Set link ID attribute of owner model as new relation ID.\n $this->owner->setAttribute($this->_settings[$rel['name']][2], $this->owner->{$rel['name']}->id);\n }\n }\n }\n }", "protected function buildRelations()\n {\n if ($this->relations_built) {\n return;\n }\n $this_class = $this->base_class;\n\n foreach ($this_class::$relations as $field => $options) {\n $object = null;\n\n $target_class = $options['rel_class'];\n\n // Segun el lugar de la llave foránea, creamos el objeto\n if ($options['fk_location'] == self::FK_THIS) {\n // Si existe la llave foranea, y tiene un valor\n if (isset($this->fields[$options['foreing_key']])) {\n if ($options['rel_type'] == 'one') {\n $object = $target_class::get(\n $this->fields[$options['foreing_key']]\n );\n } else {\n throw new \\LogicException (\"UNIMPLEMENTED FK_THIS with 'many'\");\n }\n } else {\n // No existe la llave. Creamos objetos vacíos\n if ($options['rel_type'] == 'one') {\n $object = new $target_class;\n } else {\n throw new \\LogicException (\"UNIMPLEMENTED FK_THIS with 'many'\");\n }\n }\n } else {\n // La llave foránea está en el target_class\n if ($options['rel_type'] == 'one') {\n $object = $target_class::get([\n $options['foreing_key'] => $this->fields[$options['primary_key']]\n ]);\n } else {\n $object = new RecordSet($target_class, \n [$options['foreing_key'] => $this->fields[$options['primary_key']]]);\n }\n\n\n }\n //var_dump($object); exit;\n\n\n $this->object_fields[$field] = $object;\n }\n }", "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collPermissaosRelatedByCoUsuarioAlteracao) {\n\t\t\t\tforeach ($this->collPermissaosRelatedByCoUsuarioAlteracao as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collPermissaosRelatedByCoUsuarioCadastro) {\n\t\t\t\tforeach ($this->collPermissaosRelatedByCoUsuarioCadastro as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collRlUsuarioOrgaos) {\n\t\t\t\tforeach ($this->collRlUsuarioOrgaos as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTbDescricaoChamados) {\n\t\t\t\tforeach ($this->collTbDescricaoChamados as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collUsuarioCategorias) {\n\t\t\t\tforeach ($this->collUsuarioCategorias as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collUsuarioTarefas) {\n\t\t\t\tforeach ($this->collUsuarioTarefas as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\tif ($this->collPermissaosRelatedByCoUsuarioAlteracao instanceof PropelCollection) {\n\t\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao->clearIterator();\n\t\t}\n\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = null;\n\t\tif ($this->collPermissaosRelatedByCoUsuarioCadastro instanceof PropelCollection) {\n\t\t\t$this->collPermissaosRelatedByCoUsuarioCadastro->clearIterator();\n\t\t}\n\t\t$this->collPermissaosRelatedByCoUsuarioCadastro = null;\n\t\tif ($this->collRlUsuarioOrgaos instanceof PropelCollection) {\n\t\t\t$this->collRlUsuarioOrgaos->clearIterator();\n\t\t}\n\t\t$this->collRlUsuarioOrgaos = null;\n\t\tif ($this->collTbDescricaoChamados instanceof PropelCollection) {\n\t\t\t$this->collTbDescricaoChamados->clearIterator();\n\t\t}\n\t\t$this->collTbDescricaoChamados = null;\n\t\tif ($this->collUsuarioCategorias instanceof PropelCollection) {\n\t\t\t$this->collUsuarioCategorias->clearIterator();\n\t\t}\n\t\t$this->collUsuarioCategorias = null;\n\t\tif ($this->collUsuarioTarefas instanceof PropelCollection) {\n\t\t\t$this->collUsuarioTarefas->clearIterator();\n\t\t}\n\t\t$this->collUsuarioTarefas = null;\n\t\t$this->aPerfil = null;\n\t}" ]
[ "0.53279346", "0.5052725", "0.5033467", "0.49696007", "0.49487805", "0.48957825", "0.4892381", "0.48710623", "0.48691344", "0.48363343", "0.48270226", "0.4759509", "0.4759509", "0.47541085", "0.47431684", "0.47396654", "0.47341594", "0.47037262", "0.46990106", "0.46961734", "0.4691591", "0.4677957", "0.46715283", "0.46669924", "0.4660701", "0.46536097", "0.46439818", "0.46216848", "0.4608666", "0.46022144" ]
0.637494
0
Method called to associate a OperationScenarii object to this object through the OperationScenarii foreign key attribute.
public function addOperationScenarii(OperationScenarii $l) { if ($this->collOperationScenariis === null) { $this->initOperationScenariis(); $this->collOperationScenariisPartial = true; } if (!in_array($l, $this->collOperationScenariis->getArrayCopy(), true)) { // only add it if the **same** object is not already associated $this->doAddOperationScenarii($l); if ($this->operationScenariisScheduledForDeletion and $this->operationScenariisScheduledForDeletion->contains($l)) { $this->operationScenariisScheduledForDeletion->remove($this->operationScenariisScheduledForDeletion->search($l)); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initOperationScenariis($overrideExisting = true)\n {\n if (null !== $this->collOperationScenariis && !$overrideExisting) {\n return;\n }\n $this->collOperationScenariis = new PropelObjectCollection();\n $this->collOperationScenariis->setModel('OperationScenarii');\n }", "public function setOperationScenariis(PropelCollection $operationScenariis, PropelPDO $con = null)\n {\n $operationScenariisToDelete = $this->getOperationScenariis(new Criteria(), $con)->diff($operationScenariis);\n\n\n $this->operationScenariisScheduledForDeletion = $operationScenariisToDelete;\n\n foreach ($operationScenariisToDelete as $operationScenariiRemoved) {\n $operationScenariiRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationScenariis = null;\n foreach ($operationScenariis as $operationScenarii) {\n $this->addOperationScenarii($operationScenarii);\n }\n\n $this->collOperationScenariis = $operationScenariis;\n $this->collOperationScenariisPartial = false;\n\n return $this;\n }", "function setId_serie($iid_serie)\n {\n $this->iid_serie = $iid_serie;\n }", "public function addOperation(string $operation): OperationInterface;", "abstract public function saveOperation(OperationInterface $op);", "private function setOperation(OperatorInterface $operation)\n {\n \t$this->operation = $operation;\n }", "public function setOperation(OperationInterface $operation)\n {\n $this->operation = $operation;\n }", "public function addModelIri($key, $modelIri)\n {\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // init and fill the statements array\n $addStatements = array();\n $modelIriPropertyUri = $this->_subscriptionConfig->get('modelIri');\n $addStatements[$subscriptionResourceUri] = array();\n $addStatements[$subscriptionResourceUri][$modelIriPropertyUri] = array();\n $addStatements[$subscriptionResourceUri][$modelIriPropertyUri][]\n = array(\n 'value' => $modelIri,\n 'type' => 'uri'\n );\n\n // setup the versioning options\n $versioningActionSpec = array(\n 'type' => self::VERSIONING_SUBSCRIPTION_UPDATE_ACTION_TYPE,\n 'modeluri' => $this->_selectedModelInstance->getBaseUri(),\n 'resourceuri' => $subscriptionResourceUri\n );\n\n // start versioning\n $this->_versioning->startAction($versioningActionSpec);\n\n // write the statements to the store\n $this->_selectedModelInstance->addMultipleStatements($addStatements);\n\n // end versioning\n $this->_versioning->endAction();\n }", "function setId_situacion($iid_situacion)\n {\n $this->iid_situacion = $iid_situacion;\n }", "public function addCOI() {\r\n global $db;\r\n\r\n $sql = sprintf(\"INSERT INTO `forms_coi`\r\n (`form_coi_id`, `user_id`, `form_tracking_id`, `created`, `modified`)\r\n VALUES(NULL, %s, %s, UNIX_TIMESTAMP(), UNIX_TIMESTAMP())\",\r\n $this->userId, $this->trackingFormId);\r\n $result = $db->Execute($sql);\r\n if (!$result) {\r\n throw new Exception('Unable to insert new COI form into database');\r\n }\r\n else {\r\n $coiId = mysql_insert_id();\r\n }\r\n\r\n $this->coi[] = new \\tracking\\COI($coiId);\r\n\r\n return $coiId;\r\n }", "public function getId()\n\t\t{\n\t\t\t\treturn $this->id_sucursal;\n }", "public function getCodigoSucursalSII()\n {\n return $this->codigoSucursalSII;\n }", "public function getSocio()\n {\n return $this->hasOne(Socio::className(), ['id' => 'socio_id']);\n }", "function setId_situacion($iid_situacion = '')\n {\n $this->iid_situacion = $iid_situacion;\n }", "public function SaveComandoRisco() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstComandoItem) $this->objComandoRisco->ComandoItemId = $this->lstComandoItem->SelectedValue;\n\t\t\t\tif ($this->lstComando) $this->objComandoRisco->ComandoId = $this->lstComando->SelectedValue;\n\t\t\t\tif ($this->txtReferencia) $this->objComandoRisco->Referencia = $this->txtReferencia->Text;\n\t\t\t\tif ($this->lstMolde) $this->objComandoRisco->MoldeId = $this->lstMolde->SelectedValue;\n\t\t\t\tif ($this->lstTamanho) $this->objComandoRisco->TamanhoId = $this->lstTamanho->SelectedValue;\n\t\t\t\tif ($this->txtQuantidadeRisco) $this->objComandoRisco->QuantidadeRisco = $this->txtQuantidadeRisco->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\t\t\t\tif ($this->lstBalancoPecasAsOrdemProducaoGrade) $this->objComandoRisco->BalancoPecasAsOrdemProducaoGrade = BalancoPecas::Load($this->lstBalancoPecasAsOrdemProducaoGrade->SelectedValue);\n\n\t\t\t\t// Save the ComandoRisco object\n\t\t\t\t$this->objComandoRisco->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "function getId_serie()\n {\n if (!isset($this->iid_serie) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_serie;\n }", "public function add(Operation $operation);", "public static function addNewPoi($objPoi) { \n $response = array();\n try{//poiDesignerId, name, coordinate, triggerZone, designerID\n $poiDesigner = SharcPoiDesigner::create(array(\n 'id' => $objPoi['id'],\n 'name' => $objPoi['poiDesigner']['name'], \n 'coordinate' => $objPoi['poiDesigner']['coordinate'],\n 'triggerZone' => $objPoi['poiDesigner']['triggerZone'], \n 'designerId' => $objPoi['poiDesigner']['designerId']\n )); \n $result = $poiDesigner->save(); \n if (!$result){ \n $response[\"status\"] = ERROR;\n $response[\"data\"] = INTERNAL_SERVER_ERROR; \n return $response; \n } \n \n $poiExperience = SharcPoiExperience::create(array(\n 'id' => $objPoi['id'],\n 'experienceId' => $objPoi['experienceId'], \n 'poiDesignerId' => $poiDesigner->id,\n 'description' => $objPoi['description'],\n 'typeList' => $objPoi['typeList'],\n 'eoiList' => $objPoi['eoiList'], \n 'routeList' => $objPoi['routeList'] \n ));\n \n //$poiExperience->sharcPoiDesigner()->associate(poiDe)\n \n $result = $poiExperience->save(); \n if ($result){ //= 1 success\n $response[\"status\"] = SUCCESS; \n //$poiExperience->$poiDesigner \n $response[\"data\"] = $poiExperience->toArray();\n } \n else { //error\n $response[\"status\"] = ERROR;\n $response[\"data\"] = INTERNAL_SERVER_ERROR; \n }\n //update other table e.g. route/event/media \n }\n catch(Exception $e) {\n $response[\"status\"] = ERROR;\n $response[\"data\"] = Utils::getExceptionMessage($e);\n } \n return $response; \n }", "public function insertOpcSeleccRolAction() {\n $idRol = $this->getRequest()->get('reg');\n $idOpc = $this->getRequest()->get('opc');\n\n $rolDao = new RolDao($this->getDoctrine());\n $rolDao->insertOpcSeleccRol($idRol, $idOpc);\n return $this->opcionesAsignadasAction();\n }", "public function saveInfisso(Infisso $i){\n \n try{\n $this->wpdb->insert(\n $this->table,\n array(\n 'id_preventivo' => $i->getIdPreventivo(),\n 'tipo' => $i->getTipo(),\n 'n_ante' => $i->getNAnte(),\n 'id_infisso' => $i->getIdInfisso(),\n 'altezza' => $i->getAltezza(),\n 'lunghezza' => $i->getLunghezza(),\n 'apertura' => $i->getApertura(),\n 'barra' => $i->getBarra(),\n 'serratura' => $i->getSerratura(),\n 'nodo' => $i->getNodo(),\n 'colore' => $i->getColore(),\n 'cerniera' => $i->getCerniera(),\n 'n_infisso' => $i->getNInfisso(),\n 'spesa_infisso' => $i->getSpesaInfisso(),\n 'anta_principale' => $i->getAntaPrincipale(),\n 'posizione_serratura' => $i->getPosizioneSerratura(), \n 'verniciatura' => $i->getVerniciatura()\n ),\n array('%d', '%s', '%d', '%d', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%f', '%s', '%s', '%s')\n );\n return $this->wpdb->insert_id;\n } catch (Exception $ex) {\n _e($ex);\n return false;\n }\n }", "public static function addInstanceToPool(AsignacionSc $obj, $key = null)\n\t{\n\t\tif (Propel::isInstancePoolingEnabled()) {\n\t\t\tif ($key === null) {\n\t\t\t\t$key = (string) $obj->getId();\n\t\t\t} // if key === null\n\t\t\tself::$instances[$key] = $obj;\n\t\t}\n\t}", "function CreaIntervento($ID_Operatore, $ID_Assistito, $data, $orainizio, $oraFine, $descrizione){\n\t\t$query = \"INSERT INTO interventi (ID_Operatore, ID_Assistito, Data, Ora_Inizio, Ora_Fine, Descrizione) VALUES($ID_Operatore, $ID_Assistito, '$data', '$oraInizio', '$oraFine','$descrizione')\";\n\t\tif(!$mysqli -> query($query)){\n\t\t\tdie($mysqli->error);\n\t\t}\n\t}", "public function actionCreate()\n\t{\n\t\t$model=new Ios;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t$this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Ios']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Ios'];\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tif(isset($_POST['opp_ids']))\n\t\t\t\t{\n\t\t\t\t\tforeach ($_POST['opp_ids'] as $value) {\n\t\t\t\t\t\tif(IosHasOpportunities::model()->checkRelation($model->id,$value))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t$modelHasIos = new IosHasOpportunities;\n\t\t\t\t\t\t$modelHasIos->ios_id=$model->id;\n\t\t\t\t\t\t$modelHasIos->opportunities_id=$value;\n\t\t\t\t\t\t$modelHasIos->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->redirect(array('admin'));\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t$this->renderFormAjax($model);\n\t}", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function getOperationId()\n {\n return $this->operation_id;\n }", "public function iglesia(){\n return $this->hasOne('App\\Iglesia', 'id', 'id_iglesia');\n }", "public function setPrimarySic($primarySic)\n {\n $this->primarySic = $primarySic;\n return $this;\n }", "public function inOperation(){\n //When an Operation is created we have to adjust the price of the inventory\n //and the quantity\n //We adjust the price of the inventory based on the last In\n $this->inventory->setQuantity($this->inventory->getQuantity() + $this->getQuantity());\n $this->inventory->setPrice($this->price);\n $this->type = \"IN\";\n }", "function setId_situacion($iid_situacion = '')\n {\n $this->iid_situacion = (int)$iid_situacion;\n }", "function inscribirEstudiante($estudiante_id,$semestre_id,$dicta_id) {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n $evaluacion = new Evaluacion();\n $evaluacion->estado = Objectbase::STATUS_AC;\n $evaluacion->save();\n \n $this->semestre_id = $semestre_id;\n $this->dicta_id = $dicta_id;\n $this->estudiante_id = $estudiante_id;\n $this->evaluacion_id = $evaluacion->id;\n $this->estado = Objectbase::STATUS_AC;\n $this->save();\n }" ]
[ "0.5536275", "0.5436308", "0.5380035", "0.51070744", "0.51019716", "0.48792845", "0.4863726", "0.48174158", "0.4816235", "0.47655308", "0.4710799", "0.46752945", "0.46390477", "0.46059033", "0.45966685", "0.459367", "0.45864248", "0.45555443", "0.45517206", "0.45369753", "0.4536577", "0.4533468", "0.4519478", "0.44991857", "0.44745445", "0.4452249", "0.44449916", "0.4432379", "0.442679", "0.4406618" ]
0.68358207
0
Clears out the collLnkOperationPrimeRCountriess collection This does not modify the database; however, it will remove any associated objects, causing them to be refetched by subsequent calls to accessor method.
public function clearLnkOperationPrimeRCountriess() { $this->collLnkOperationPrimeRCountriess = null; // important to set this to null since that means it is uninitialized $this->collLnkOperationPrimeRCountriessPartial = null; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n {\n $this->op_prime_id = null;\n $this->op_id = null;\n $this->op_prime_libelle = null;\n $this->op_prime_numero = null;\n $this->gdl_art_id = null;\n $this->operation_prime_currency_id = null;\n $this->operation_prime_r_reward_type_id = null;\n $this->operation_prime_r_reward_expedition_mode_id = null;\n $this->operation_prime_r_reward_transporter_id = null;\n $this->operation_prime_fixed_amount = null;\n $this->operation_prime_product_price_pourcentage = null;\n $this->operation_prime_maximum_amount = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete;\n\n foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) {\n $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null);\n }\n\n $this->collLnkOperationPrimeRCountriess = null;\n foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) {\n $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries);\n }\n\n $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n\n return $this;\n }", "public function clearContributionss()\n {\n $this->collContributionss = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearInappropriates()\n\t{\n\t\t$this->collInappropriates = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clear()\n {\n $this->links = [];\n }", "public function clearMemberReferrals()\n\t{\n\t\t$this->collMemberReferrals = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearColetaPesquisas()\n\t{\n\t\t$this->collColetaPesquisas = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearNoticias()\n\t{\n\t\t$this->collNoticias = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearCOMVendeurs()\n {\n $this->collCOMVendeurs = null; // important to set this to NULL since that means it is uninitialized\n }", "public function addLnkOperationPrimeRCountries(LnkOperationPrimeRCountries $l)\n {\n if ($this->collLnkOperationPrimeRCountriess === null) {\n $this->initLnkOperationPrimeRCountriess();\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n if (!in_array($l, $this->collLnkOperationPrimeRCountriess->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddLnkOperationPrimeRCountries($l);\n\n if ($this->lnkOperationPrimeRCountriessScheduledForDeletion and $this->lnkOperationPrimeRCountriessScheduledForDeletion->contains($l)) {\n $this->lnkOperationPrimeRCountriessScheduledForDeletion->remove($this->lnkOperationPrimeRCountriessScheduledForDeletion->search($l));\n }\n }\n\n return $this;\n }", "public function clear()\n {\n if (null !== $this->aPublisher) {\n $this->aPublisher->removeBiblio($this);\n }\n if (null !== $this->aLanguage) {\n $this->aLanguage->removeBiblio($this);\n }\n if (null !== $this->aPlace) {\n $this->aPlace->removeBiblio($this);\n }\n if (null !== $this->aFrequency) {\n $this->aFrequency->removeBiblio($this);\n }\n if (null !== $this->aUser) {\n $this->aUser->removeBiblio($this);\n }\n $this->biblio_id = null;\n $this->title = null;\n $this->sor = null;\n $this->edition = null;\n $this->isbn_issn = null;\n $this->publisher_id = null;\n $this->publish_year = null;\n $this->collation = null;\n $this->series_title = null;\n $this->call_number = null;\n $this->language_id = null;\n $this->source = null;\n $this->publish_place_id = null;\n $this->classification = null;\n $this->notes = null;\n $this->image = null;\n $this->file_att = null;\n $this->opac_hide = null;\n $this->promoted = null;\n $this->labels = null;\n $this->frequency_id = null;\n $this->spec_detail_info = null;\n $this->input_date = null;\n $this->last_update = null;\n $this->uid = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearOperationScenariis()\n {\n $this->collOperationScenariis = null; // important to set this to null since that means it is uninitialized\n $this->collOperationScenariisPartial = null;\n\n return $this;\n }", "public function clearOffensives()\n\t{\n\t\t$this->collOffensives = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function initLnkOperationPrimeRCountriess($overrideExisting = true)\n {\n if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) {\n return;\n }\n $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection();\n $this->collLnkOperationPrimeRCountriess->setModel('LnkOperationPrimeRCountries');\n }", "public function clear()\n {\n $this->feature_cvterm_id = null;\n $this->feature_id = null;\n $this->cvterm_id = null;\n $this->pub_id = null;\n $this->is_not = null;\n $this->rank = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "public function clearRatings()\n {\n $this->collRatings = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearPainRatings()\n {\n $this->collPainRatings = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearPesquisas()\n\t{\n\t\t$this->collPesquisas = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public static function clearRelatedInstancePool()\n\t{\n\t\t// invalidate objects in TbturmaProfessorPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tTbturmaProfessorPeer::clearInstancePool();\n\n\t}", "public function clear() {\n\t\t\n\t\t$queryString = \"\n\t\t\tMATCH (n)-[r]-()\n\t\t\tDELETE n, r\n\t\t\";\n\t\t\n\t\t$result = $this->query($queryString);\n\t\t\n\t\t$queryString = \"\n\t\t\tMATCH (n)\n\t\t\tDELETE n\n\t\t\";\n\t\t\n\t\t$result = $this->query($queryString);\n\t}", "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collOperationScenariis) {\n foreach ($this->collOperationScenariis as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aOperations instanceof Persistent) {\n $this->aOperations->clearAllReferences($deep);\n }\n if ($this->aRCurrencies instanceof Persistent) {\n $this->aRCurrencies->clearAllReferences($deep);\n }\n if ($this->aRRewardTypes instanceof Persistent) {\n $this->aRRewardTypes->clearAllReferences($deep);\n }\n if ($this->aRRewardExpeditionModes instanceof Persistent) {\n $this->aRRewardExpeditionModes->clearAllReferences($deep);\n }\n if ($this->aRRewardTransporters instanceof Persistent) {\n $this->aRRewardTransporters->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collOperationPrestationss instanceof PropelCollection) {\n $this->collOperationPrestationss->clearIterator();\n }\n $this->collOperationPrestationss = null;\n if ($this->collOperationScenariis instanceof PropelCollection) {\n $this->collOperationScenariis->clearIterator();\n }\n $this->collOperationScenariis = null;\n if ($this->collLnkOperationPrimeRCountriess instanceof PropelCollection) {\n $this->collLnkOperationPrimeRCountriess->clearIterator();\n }\n $this->collLnkOperationPrimeRCountriess = null;\n $this->aOperations = null;\n $this->aRCurrencies = null;\n $this->aRRewardTypes = null;\n $this->aRRewardExpeditionModes = null;\n $this->aRRewardTransporters = null;\n }", "public function clearBiblioTopics()\n {\n $this->collBiblioTopics = null; // important to set this to NULL since that means it is uninitialized\n }", "function clear()\r\n\t{\r\n\t\t// Clear the all list\r\n\t\t$this->all = array();\r\n\r\n\t\t// Clear errors\r\n\t\t$this->error = new stdClass();\r\n\t\t$this->error->all = array();\r\n\t\t$this->error->string = '';\r\n\r\n\t\t// Clear this objects properties and set blank error messages in case they are accessed\r\n\t\tforeach ($this->fields as $field)\r\n\t\t{\r\n\t\t\t$this->{$field} = NULL;\r\n\t\t\t$this->error->{$field} = '';\r\n\t\t}\r\n\r\n\t\t// Clear this objects \"has many\" related objects\r\n\t\tforeach ($this->has_many as $related)\r\n\t\t{\r\n\t\t\tunset($this->{$related});\r\n\t\t}\r\n\r\n\t\t// Clear this objects \"has one\" related objects\r\n\t\tforeach ($this->has_one as $related)\r\n\t\t{\r\n\t\t\tunset($this->{$related});\r\n\t\t}\r\n\r\n\t\t// Clear the query related list\r\n\t\t$this->query_related = array();\r\n\r\n\t\t// Clear and refresh stored values\r\n\t\t$this->stored = new stdClass();\r\n\r\n\t\t$this->_refresh_stored_values();\r\n\t}", "public function clear() {\n $this->_documentBoost = FALSE;\n\n $this->_fields = array();\n $this->_fieldBoosts = array();\n }", "public function clearCheckInformations()\n\t{\n\t\t$this->collCheckInformations = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearOpenids()\n\t{\n\t\t$this->collOpenids = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearGearReviews()\n\t{\n\t\t$this->collGearReviews = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clear()\n {\n $this->collection->clear();\n $this->keys = [];\n }", "public function clearBookks()\n {\n $this->collBookks = null; // important to set this to null since that means it is uninitialized\n $this->collBookksPartial = null;\n\n return $this;\n }", "public function clearRIssuesNarrationplugins()\n {\n $this->collRIssuesNarrationplugins = null; // important to set this to NULL since that means it is uninitialized\n }" ]
[ "0.64430946", "0.6380274", "0.59960514", "0.5976945", "0.5924551", "0.58635014", "0.5850904", "0.5838168", "0.5825917", "0.56791365", "0.5651359", "0.56427115", "0.5636238", "0.5629349", "0.5627899", "0.56266546", "0.56032336", "0.56003785", "0.5572963", "0.55691105", "0.5540146", "0.547442", "0.54718417", "0.5446931", "0.54429954", "0.5431356", "0.54248154", "0.54135424", "0.5396098", "0.5385119" ]
0.8122684
0
reset is the collLnkOperationPrimeRCountriess collection loaded partially
public function resetPartialLnkOperationPrimeRCountriess($v = true) { $this->collLnkOperationPrimeRCountriessPartial = $v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearLnkOperationPrimeRCountriess()\n {\n $this->collLnkOperationPrimeRCountriess = null; // important to set this to null since that means it is uninitialized\n $this->collLnkOperationPrimeRCountriessPartial = null;\n\n return $this;\n }", "public function resetLookupCollections()\n\t{\n\t\t$this->lookupCollections[] = null;\n\t}", "public function reset() {\n\t\t\t$this->arList = NULL; \t\n\t\t}", "public static function reset()\n {\n self::$toLoad = array();\n }", "public function reset()\n {\n $this->values[self::RES] = array();\n }", "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete;\n\n foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) {\n $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null);\n }\n\n $this->collLnkOperationPrimeRCountriess = null;\n foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) {\n $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries);\n }\n\n $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n\n return $this;\n }", "public function reset()\n {\n $this->_contacts = [];\n $this->_lists = [];\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_RSEED] = null;\n $this->values[self::_HERO_BASES] = array();\n $this->values[self::_HERO_DYNAS] = array();\n }", "public function reset() {\n $this->customurlscount = 0;\n }", "function reset() {\n\t\tparent::_resetSet();\n\t}", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n $this->values[self::_ITEMS] = array();\n }", "public function refresh()\n {\n $this->_totalCount = null;\n $this->_models = null;\n $this->_keys = null;\n }", "public function reset()\n\t{\n\t\t$this->get(1);\n\t}", "function reset(){\n\t\t$this->__columns = array();\n\t\t$this->__actions = array();\n\t}", "private function resetAll(){\n $this->score = ['heritage'=> 0,'relax'=> 0,'sightseeing'=> 0,'weather'=> 0,'populated'=> 0];\n $this->answeredQuestions = [];\n $this->answersId = [];\n }", "function Reset()\n\t{\t$this->details = array();\n\t\t$this->courses = array();\n\t\t$this->id = 0;\n\t}", "public function reset()\n\t{\n\t\t$this->queries = [];\n\t\t$this->count = [\n\t\t\t'total' => 0, 'slow' => 0, 'select' => 0, 'insert' => 0, 'update' => 0, 'delete' => 0, 'other' => 0\n\t\t];\n\n\t\t$this->modelsActions = [];\n\t\t$this->modelsCount = [\n\t\t\t'retrieved' => [], 'created' => [], 'updated' => [], 'deleted' => []\n\t\t];\n\n\t\t$this->nextQueryModel = null;\n\t}", "public function reset()\n {\n $this->values[self::_GUILDS] = array();\n $this->values[self::_RESULT] = null;\n $this->values[self::_CREATE_COST] = null;\n }", "public function initLnkOperationPrimeRCountriess($overrideExisting = true)\n {\n if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) {\n return;\n }\n $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection();\n $this->collLnkOperationPrimeRCountriess->setModel('LnkOperationPrimeRCountries');\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_HERO] = array();\n $this->values[self::_DIAMOND] = null;\n }", "private function reset_state() {\n\n\t\t\tglobal $ld_qs_api_vars;\n\t\t\t/**\n\t\t\t * Reset the state only if we have some data in memory upfront\n\t\t\t * because embed will be called only when there is valid data\n\t\t\t * available in memory.\n\t\t\t */\n\t\t\tif ( ! empty( $this->stat_refs ) ) {\n\t\t\t\t$GLOBALS['ld_qs_api_vars'] = $ld_qs_api_vars ? $ld_qs_api_vars : array();\n\t\t\t\t$object_vars = get_object_vars( $this );\n\t\t\t\t$GLOBALS['ld_qs_api_vars'][] = $object_vars;\n\n\t\t\t\tforeach ( $object_vars as $property => $var ) {\n\n\t\t\t\t\tswitch ( gettype( $var ) ) {\n\n\t\t\t\t\t\tcase 'integer':\n\t\t\t\t\t\t\t$this->$property = 0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'string':\n\t\t\t\t\t\t\t$this->$property = '';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'array':\n\t\t\t\t\t\t\t$this->$property = array();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$this->$property = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static function reset() {\n\t\tself::$objects = array();\n\t}", "public function resetRelations()\n\t{\n\t\t$this->relations = array();\n\t}", "public function reset()\n {\n $this->values[self::_GUILDS] = null;\n $this->values[self::_RESULT] = null;\n $this->values[self::_CREATE_COST] = null;\n }", "private function resetResults() {\n $this->results = array();\n }", "function Reset ( )\n{\n $this->_dataset = array();\n $this->_ReversedRecord = false;\n $this->_CurrPtr = -1;\n $this->_PageCount = 0;\n $this->_RecordCount = 0;\n $this->_new_page_(0);\n $this->_isAscending = true;\n $this->_FilterExp = '';\n}", "private function reset()\n\t{\t\t\n\t\t$this->limit = null;\n\t\t\n\t\t$this->table = null;\n\t\t\n\t\t$this->offset = null;\n\t\t\n\t\t$this->data = [];\n\t\t\n\t\t$this->joins = [];\n\t\t\n\t\t$this->wheres = [];\n\t\t\n\t\t$this->orderBy = [];\n\t\t\n\t\t$this->selects = [];\n\t\t\n\t\t$this->bindings = [];\n\t\t\t\n\t}", "function resetPred(){\n\t\tforeach($vertexList as $v){\n\t\t\t$v->visited = false;\n\t\t\t$v->pret = NULL;\n\t\t}\n\t}", "public function clear()\n {\n $this->links = [];\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_LINEUP] = array();\n $this->values[self::_GS] = null;\n }" ]
[ "0.7394799", "0.6394161", "0.6371969", "0.6296", "0.62572", "0.62346", "0.6208907", "0.6204121", "0.620173", "0.618232", "0.6151997", "0.6108509", "0.6082319", "0.6077061", "0.6076555", "0.607531", "0.60681075", "0.6067455", "0.6061299", "0.6022697", "0.60200256", "0.6013597", "0.6011874", "0.60064846", "0.60061145", "0.59921795", "0.598454", "0.59624374", "0.5934113", "0.59306514" ]
0.64632845
1
Initializes the collLnkOperationPrimeRCountriess collection. By default this just sets the collLnkOperationPrimeRCountriess collection to an empty array (like clearcollLnkOperationPrimeRCountriess()); however, you may wish to override this method in your stub class to provide setting appropriate to your application for example, setting the initial array to the values stored in database.
public function initLnkOperationPrimeRCountriess($overrideExisting = true) { if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) { return; } $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection(); $this->collLnkOperationPrimeRCountriess->setModel('LnkOperationPrimeRCountries'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete;\n\n foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) {\n $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null);\n }\n\n $this->collLnkOperationPrimeRCountriess = null;\n foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) {\n $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries);\n }\n\n $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n\n return $this;\n }", "public function clearLnkOperationPrimeRCountriess()\n {\n $this->collLnkOperationPrimeRCountriess = null; // important to set this to null since that means it is uninitialized\n $this->collLnkOperationPrimeRCountriessPartial = null;\n\n return $this;\n }", "public function addLnkOperationPrimeRCountries(LnkOperationPrimeRCountries $l)\n {\n if ($this->collLnkOperationPrimeRCountriess === null) {\n $this->initLnkOperationPrimeRCountriess();\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n if (!in_array($l, $this->collLnkOperationPrimeRCountriess->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddLnkOperationPrimeRCountries($l);\n\n if ($this->lnkOperationPrimeRCountriessScheduledForDeletion and $this->lnkOperationPrimeRCountriessScheduledForDeletion->contains($l)) {\n $this->lnkOperationPrimeRCountriessScheduledForDeletion->remove($this->lnkOperationPrimeRCountriessScheduledForDeletion->search($l));\n }\n }\n\n return $this;\n }", "public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n // return empty collection\n $this->initLnkOperationPrimeRCountriess();\n } else {\n $collLnkOperationPrimeRCountriess = LnkOperationPrimeRCountriesQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collLnkOperationPrimeRCountriessPartial && count($collLnkOperationPrimeRCountriess)) {\n $this->initLnkOperationPrimeRCountriess(false);\n\n foreach ($collLnkOperationPrimeRCountriess as $obj) {\n if (false == $this->collLnkOperationPrimeRCountriess->contains($obj)) {\n $this->collLnkOperationPrimeRCountriess->append($obj);\n }\n }\n\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n $collLnkOperationPrimeRCountriess->getInternalIterator()->rewind();\n\n return $collLnkOperationPrimeRCountriess;\n }\n\n if ($partial && $this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $obj) {\n if ($obj->isNew()) {\n $collLnkOperationPrimeRCountriess[] = $obj;\n }\n }\n }\n\n $this->collLnkOperationPrimeRCountriess = $collLnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n }\n }\n\n return $this->collLnkOperationPrimeRCountriess;\n }", "public function getLnkOperationPrimeRCountriessJoinRCountries($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria);\n $query->joinWith('RCountries', $join_behavior);\n\n return $this->getLnkOperationPrimeRCountriess($query, $con);\n }", "public function resetPartialLnkOperationPrimeRCountriess($v = true)\n {\n $this->collLnkOperationPrimeRCountriessPartial = $v;\n }", "public function initLinks()\n\t{\n\t\tif ($this->collLinks === null) {\n\t\t\t$this->collLinks = array();\n\t\t}\n\t}", "public function countLnkOperationPrimeRCountriess(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n return 0;\n }\n\n if ($partial && !$criteria) {\n return count($this->getLnkOperationPrimeRCountriess());\n }\n $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByOperationPrimes($this)\n ->count($con);\n }\n\n return count($this->collLnkOperationPrimeRCountriess);\n }", "public function initMemberReferrals()\n\t{\n\t\t$this->collMemberReferrals = array();\n\t}", "public function initPostPollVotes()\n\t{\n\t\t$this->collPostPollVotes = array();\n\t}", "public function initInappropriates()\n\t{\n\t\t$this->collInappropriates = array();\n\t}", "public function initAnswerVotes()\n\t{\n\t\t$this->collAnswerVotes = array();\n\t}", "public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)\n {\n $keys = OperationPrimesPeer::getFieldNames($keyType);\n\n if (array_key_exists($keys[0], $arr)) $this->setOpPrimeId($arr[$keys[0]]);\n if (array_key_exists($keys[1], $arr)) $this->setOpId($arr[$keys[1]]);\n if (array_key_exists($keys[2], $arr)) $this->setOpPrimeLibelle($arr[$keys[2]]);\n if (array_key_exists($keys[3], $arr)) $this->setOpPrimeNumero($arr[$keys[3]]);\n if (array_key_exists($keys[4], $arr)) $this->setGdlArtId($arr[$keys[4]]);\n if (array_key_exists($keys[5], $arr)) $this->setOperationPrimeCurrencyId($arr[$keys[5]]);\n if (array_key_exists($keys[6], $arr)) $this->setOperationPrimeRRewardTypeId($arr[$keys[6]]);\n if (array_key_exists($keys[7], $arr)) $this->setOperationPrimeRRewardExpeditionModeId($arr[$keys[7]]);\n if (array_key_exists($keys[8], $arr)) $this->setOperationPrimeRRewardTransporterId($arr[$keys[8]]);\n if (array_key_exists($keys[9], $arr)) $this->setOperationPrimeFixedAmount($arr[$keys[9]]);\n if (array_key_exists($keys[10], $arr)) $this->setOperationPrimeProductPricePourcentage($arr[$keys[10]]);\n if (array_key_exists($keys[11], $arr)) $this->setOperationPrimeMaximumAmount($arr[$keys[11]]);\n }", "public function initQuestionVotes()\n\t{\n\t\t$this->collQuestionVotes = array();\n\t}", "protected function _initPollList()\n {\n if (!isset($this->_cache['poll']) &&\n !$GLOBALS['prefs']->getValue('nav_poll_all')) {\n /* We ALWAYS poll the INBOX. */\n $this->_cache['poll'] = array('INBOX' => 1);\n\n /* Add the list of polled mailboxes from the prefs. */\n if ($navPollList = @unserialize($GLOBALS['prefs']->getValue('nav_poll'))) {\n $this->_cache['poll'] += $navPollList;\n }\n }\n }", "public function initVpoRequestCargos()\n\t{\n\t\t$this->collVpoRequestCargos = array();\n\t}", "public function initCampaignLinks()\n\t{\n\t\t$this->collCampaignLinks = array();\n\t}", "function _initrs()\n\t{\n\t\t$this->_numOfRows = ldap_count_entries( $this->connection->_connectionID, $this->_queryID );\n\t}", "public function initOperationPrestationss($overrideExisting = true)\n {\n if (null !== $this->collOperationPrestationss && !$overrideExisting) {\n return;\n }\n $this->collOperationPrestationss = new PropelObjectCollection();\n $this->collOperationPrestationss->setModel('OperationPrestations');\n }", "public function setLinksFoundArray()\n { \n $cnt = count($this->links_found_url_descriptors);\n for ($x=0; $x<$cnt; $x++)\n {\n $UrlDescriptor = $this->links_found_url_descriptors[$x];\n \n // Convert $UrlDescriptor-object to an array\n $object_vars = get_object_vars($UrlDescriptor);\n \n $this->links_found[] = $object_vars;\n }\n }", "public function setOpPrimeLibelle($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->op_prime_libelle !== $v) {\n $this->op_prime_libelle = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE;\n }\n\n\n return $this;\n }", "public function _construct(){\n $this->KcsPoll = new ArrayCollection();\n }", "public function initGearReviews()\n\t{\n\t\t$this->collGearReviews = array();\n\t}", "public function __construct() {\r\n\t\t$this->links = array();\r\n\t}", "public function __construct($page, $totalcount, $rpp, $style=1)\n {\n $this->rpp=$rpp;\n $this->page=$page;\n $this->style=$style;\n \n $this->totalPages=$this->setTotalPages($totalcount, $rpp);\n }", "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n\n return $criteria;\n }", "public function clearRIssuesNarrationplugins()\n {\n $this->collRIssuesNarrationplugins = null; // important to set this to NULL since that means it is uninitialized\n }", "public function initialize()\n {\n if (is_null($this->images)) {\n $this->images = new ArrayCollection();\n }\n }", "public function initOffensives()\n\t{\n\t\t$this->collOffensives = array();\n\t}", "public function initializeAction()\n {\n $this->totalItems = $this->widgetConfiguration['totalItems'];\n $this->itemsOffset = $this->widgetConfiguration['itemsOffset'];\n $this->itemsPerPage = $this->widgetConfiguration['itemsPerPage'];\n $this->maxPaginationLinks = $this->widgetConfiguration['maxPaginationLinks'];\n\n $this->currentPage = intval($this->itemsOffset / $this->itemsPerPage + 1);\n $this->numberOfPages = $this->itemsPerPage > 0 ? ceil($this->totalItems / $this->itemsPerPage) : 0;\n\n ArrayUtility::mergeRecursiveWithOverrule($this->linkConfiguration, $this->widgetConfiguration['linkConfiguration']);\n }" ]
[ "0.71638006", "0.70091325", "0.6869609", "0.62956905", "0.5360133", "0.52857304", "0.51841426", "0.51489633", "0.4538413", "0.4529241", "0.44997868", "0.4471349", "0.4462172", "0.43436876", "0.4245498", "0.42426777", "0.42295885", "0.4212909", "0.41634142", "0.41592157", "0.41551885", "0.40894255", "0.40395114", "0.40328273", "0.40190333", "0.40031505", "0.39965683", "0.39850634", "0.3973079", "0.39637285" ]
0.7232321
0
Gets an array of LnkOperationPrimeRCountries objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, the cached collection is returned. If this OperationPrimes is new, it will return an empty collection or the current collection; the criteria is ignored on a new object.
public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null) { $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew(); if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) { // return empty collection $this->initLnkOperationPrimeRCountriess(); } else { $collLnkOperationPrimeRCountriess = LnkOperationPrimeRCountriesQuery::create(null, $criteria) ->filterByOperationPrimes($this) ->find($con); if (null !== $criteria) { if (false !== $this->collLnkOperationPrimeRCountriessPartial && count($collLnkOperationPrimeRCountriess)) { $this->initLnkOperationPrimeRCountriess(false); foreach ($collLnkOperationPrimeRCountriess as $obj) { if (false == $this->collLnkOperationPrimeRCountriess->contains($obj)) { $this->collLnkOperationPrimeRCountriess->append($obj); } } $this->collLnkOperationPrimeRCountriessPartial = true; } $collLnkOperationPrimeRCountriess->getInternalIterator()->rewind(); return $collLnkOperationPrimeRCountriess; } if ($partial && $this->collLnkOperationPrimeRCountriess) { foreach ($this->collLnkOperationPrimeRCountriess as $obj) { if ($obj->isNew()) { $collLnkOperationPrimeRCountriess[] = $obj; } } } $this->collLnkOperationPrimeRCountriess = $collLnkOperationPrimeRCountriess; $this->collLnkOperationPrimeRCountriessPartial = false; } } return $this->collLnkOperationPrimeRCountriess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n\n return $criteria;\n }", "public function getOperationScenariis($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationScenariisPartial && !$this->isNew();\n if (null === $this->collOperationScenariis || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationScenariis) {\n // return empty collection\n $this->initOperationScenariis();\n } else {\n $collOperationScenariis = OperationScenariiQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collOperationScenariisPartial && count($collOperationScenariis)) {\n $this->initOperationScenariis(false);\n\n foreach ($collOperationScenariis as $obj) {\n if (false == $this->collOperationScenariis->contains($obj)) {\n $this->collOperationScenariis->append($obj);\n }\n }\n\n $this->collOperationScenariisPartial = true;\n }\n\n $collOperationScenariis->getInternalIterator()->rewind();\n\n return $collOperationScenariis;\n }\n\n if ($partial && $this->collOperationScenariis) {\n foreach ($this->collOperationScenariis as $obj) {\n if ($obj->isNew()) {\n $collOperationScenariis[] = $obj;\n }\n }\n }\n\n $this->collOperationScenariis = $collOperationScenariis;\n $this->collOperationScenariisPartial = false;\n }\n }\n\n return $this->collOperationScenariis;\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_ID)) $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n if ($this->isColumnModified(OperationPrimesPeer::OP_ID)) $criteria->add(OperationPrimesPeer::OP_ID, $this->op_id);\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_LIBELLE)) $criteria->add(OperationPrimesPeer::OP_PRIME_LIBELLE, $this->op_prime_libelle);\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_NUMERO)) $criteria->add(OperationPrimesPeer::OP_PRIME_NUMERO, $this->op_prime_numero);\n if ($this->isColumnModified(OperationPrimesPeer::GDL_ART_ID)) $criteria->add(OperationPrimesPeer::GDL_ART_ID, $this->gdl_art_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID, $this->operation_prime_currency_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID, $this->operation_prime_r_reward_type_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID, $this->operation_prime_r_reward_expedition_mode_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID, $this->operation_prime_r_reward_transporter_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT, $this->operation_prime_fixed_amount);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE, $this->operation_prime_product_price_pourcentage);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT, $this->operation_prime_maximum_amount);\n\n return $criteria;\n }", "public function getOperationPrestationss($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collOperationPrestationssPartial && !$this->isNew();\n if (null === $this->collOperationPrestationss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collOperationPrestationss) {\n // return empty collection\n $this->initOperationPrestationss();\n } else {\n $collOperationPrestationss = OperationPrestationsQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collOperationPrestationssPartial && count($collOperationPrestationss)) {\n $this->initOperationPrestationss(false);\n\n foreach ($collOperationPrestationss as $obj) {\n if (false == $this->collOperationPrestationss->contains($obj)) {\n $this->collOperationPrestationss->append($obj);\n }\n }\n\n $this->collOperationPrestationssPartial = true;\n }\n\n $collOperationPrestationss->getInternalIterator()->rewind();\n\n return $collOperationPrestationss;\n }\n\n if ($partial && $this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $obj) {\n if ($obj->isNew()) {\n $collOperationPrestationss[] = $obj;\n }\n }\n }\n\n $this->collOperationPrestationss = $collOperationPrestationss;\n $this->collOperationPrestationssPartial = false;\n }\n }\n\n return $this->collOperationPrestationss;\n }", "public function getRIssuesAllplugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collRIssuesAllpluginsPartial && !$this->isNew();\n if (null === $this->collRIssuesAllplugins || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collRIssuesAllplugins) {\n // return empty collection\n $this->initRIssuesAllplugins();\n } else {\n $collRIssuesAllplugins = ChildRIssuesAllpluginQuery::create(null, $criteria)\n ->filterByAllIssue($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collRIssuesAllpluginsPartial && count($collRIssuesAllplugins)) {\n $this->initRIssuesAllplugins(false);\n\n foreach ($collRIssuesAllplugins as $obj) {\n if (false == $this->collRIssuesAllplugins->contains($obj)) {\n $this->collRIssuesAllplugins->append($obj);\n }\n }\n\n $this->collRIssuesAllpluginsPartial = true;\n }\n\n return $collRIssuesAllplugins;\n }\n\n if ($partial && $this->collRIssuesAllplugins) {\n foreach ($this->collRIssuesAllplugins as $obj) {\n if ($obj->isNew()) {\n $collRIssuesAllplugins[] = $obj;\n }\n }\n }\n\n $this->collRIssuesAllplugins = $collRIssuesAllplugins;\n $this->collRIssuesAllpluginsPartial = false;\n }\n }\n\n return $this->collRIssuesAllplugins;\n }", "public function getFeatureCvtermprops($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collFeatureCvtermpropsPartial && !$this->isNew();\n if (null === $this->collFeatureCvtermprops || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collFeatureCvtermprops) {\n // return empty collection\n $this->initFeatureCvtermprops();\n } else {\n $collFeatureCvtermprops = FeatureCvtermpropQuery::create(null, $criteria)\n ->filterByFeatureCvterm($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collFeatureCvtermpropsPartial && count($collFeatureCvtermprops)) {\n $this->initFeatureCvtermprops(false);\n\n foreach($collFeatureCvtermprops as $obj) {\n if (false == $this->collFeatureCvtermprops->contains($obj)) {\n $this->collFeatureCvtermprops->append($obj);\n }\n }\n\n $this->collFeatureCvtermpropsPartial = true;\n }\n\n $collFeatureCvtermprops->getInternalIterator()->rewind();\n return $collFeatureCvtermprops;\n }\n\n if($partial && $this->collFeatureCvtermprops) {\n foreach($this->collFeatureCvtermprops as $obj) {\n if($obj->isNew()) {\n $collFeatureCvtermprops[] = $obj;\n }\n }\n }\n\n $this->collFeatureCvtermprops = $collFeatureCvtermprops;\n $this->collFeatureCvtermpropsPartial = false;\n }\n }\n\n return $this->collFeatureCvtermprops;\n }", "public function getContributionss(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collContributionssPartial && !$this->isNew();\n if (null === $this->collContributionss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collContributionss) {\n // return empty collection\n $this->initContributionss();\n } else {\n $collContributionss = ChildContributionsQuery::create(null, $criteria)\n ->filterByIssues($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collContributionssPartial && count($collContributionss)) {\n $this->initContributionss(false);\n\n foreach ($collContributionss as $obj) {\n if (false == $this->collContributionss->contains($obj)) {\n $this->collContributionss->append($obj);\n }\n }\n\n $this->collContributionssPartial = true;\n }\n\n return $collContributionss;\n }\n\n if ($partial && $this->collContributionss) {\n foreach ($this->collContributionss as $obj) {\n if ($obj->isNew()) {\n $collContributionss[] = $obj;\n }\n }\n }\n\n $this->collContributionss = $collContributionss;\n $this->collContributionssPartial = false;\n }\n }\n\n return $this->collContributionss;\n }", "public function getRIssuesNarrationplugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collRIssuesNarrationpluginsPartial && !$this->isNew();\n if (null === $this->collRIssuesNarrationplugins || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collRIssuesNarrationplugins) {\n // return empty collection\n $this->initRIssuesNarrationplugins();\n } else {\n $collRIssuesNarrationplugins = ChildRIssuesNarrationpluginQuery::create(null, $criteria)\n ->filterByNarrationIssue($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collRIssuesNarrationpluginsPartial && count($collRIssuesNarrationplugins)) {\n $this->initRIssuesNarrationplugins(false);\n\n foreach ($collRIssuesNarrationplugins as $obj) {\n if (false == $this->collRIssuesNarrationplugins->contains($obj)) {\n $this->collRIssuesNarrationplugins->append($obj);\n }\n }\n\n $this->collRIssuesNarrationpluginsPartial = true;\n }\n\n return $collRIssuesNarrationplugins;\n }\n\n if ($partial && $this->collRIssuesNarrationplugins) {\n foreach ($this->collRIssuesNarrationplugins as $obj) {\n if ($obj->isNew()) {\n $collRIssuesNarrationplugins[] = $obj;\n }\n }\n }\n\n $this->collRIssuesNarrationplugins = $collRIssuesNarrationplugins;\n $this->collRIssuesNarrationpluginsPartial = false;\n }\n }\n\n return $this->collRIssuesNarrationplugins;\n }", "public function getCMDPieces(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCMDPiecesPartial && !$this->isNew();\n if (null === $this->collCMDPieces || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCMDPieces) {\n // return empty collection\n $this->initCMDPieces();\n } else {\n $collCMDPieces = ChildCMDPieceQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCMDPiecesPartial && count($collCMDPieces)) {\n $this->initCMDPieces(false);\n\n foreach ($collCMDPieces as $obj) {\n if (false == $this->collCMDPieces->contains($obj)) {\n $this->collCMDPieces->append($obj);\n }\n }\n\n $this->collCMDPiecesPartial = true;\n }\n\n return $collCMDPieces;\n }\n\n if ($partial && $this->collCMDPieces) {\n foreach ($this->collCMDPieces as $obj) {\n if ($obj->isNew()) {\n $collCMDPieces[] = $obj;\n }\n }\n }\n\n $this->collCMDPieces = $collCMDPieces;\n $this->collCMDPiecesPartial = false;\n }\n }\n\n return $this->collCMDPieces;\n }", "public function getLnkOperationPrimeRCountriessJoinRCountries($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria);\n $query->joinWith('RCountries', $join_behavior);\n\n return $this->getLnkOperationPrimeRCountriess($query, $con);\n }", "public function getCOMConditions(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCOMConditionsPartial && !$this->isNew();\n if (null === $this->collCOMConditions || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCOMConditions) {\n // return empty collection\n $this->initCOMConditions();\n } else {\n $collCOMConditions = ChildCOMConditionQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCOMConditionsPartial && count($collCOMConditions)) {\n $this->initCOMConditions(false);\n\n foreach ($collCOMConditions as $obj) {\n if (false == $this->collCOMConditions->contains($obj)) {\n $this->collCOMConditions->append($obj);\n }\n }\n\n $this->collCOMConditionsPartial = true;\n }\n\n return $collCOMConditions;\n }\n\n if ($partial && $this->collCOMConditions) {\n foreach ($this->collCOMConditions as $obj) {\n if ($obj->isNew()) {\n $collCOMConditions[] = $obj;\n }\n }\n }\n\n $this->collCOMConditions = $collCOMConditions;\n $this->collCOMConditionsPartial = false;\n }\n }\n\n return $this->collCOMConditions;\n }", "public function getRIssuesXmlplugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collRIssuesXmlpluginsPartial && !$this->isNew();\n if (null === $this->collRIssuesXmlplugins || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collRIssuesXmlplugins) {\n // return empty collection\n $this->initRIssuesXmlplugins();\n } else {\n $collRIssuesXmlplugins = ChildRIssuesXmlpluginQuery::create(null, $criteria)\n ->filterByXmlIssue($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collRIssuesXmlpluginsPartial && count($collRIssuesXmlplugins)) {\n $this->initRIssuesXmlplugins(false);\n\n foreach ($collRIssuesXmlplugins as $obj) {\n if (false == $this->collRIssuesXmlplugins->contains($obj)) {\n $this->collRIssuesXmlplugins->append($obj);\n }\n }\n\n $this->collRIssuesXmlpluginsPartial = true;\n }\n\n return $collRIssuesXmlplugins;\n }\n\n if ($partial && $this->collRIssuesXmlplugins) {\n foreach ($this->collRIssuesXmlplugins as $obj) {\n if ($obj->isNew()) {\n $collRIssuesXmlplugins[] = $obj;\n }\n }\n }\n\n $this->collRIssuesXmlplugins = $collRIssuesXmlplugins;\n $this->collRIssuesXmlpluginsPartial = false;\n }\n }\n\n return $this->collRIssuesXmlplugins;\n }", "public function getNarrationPlugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collNarrationPluginsPartial && !$this->isNew();\n if (null === $this->collNarrationPlugins || null !== $criteria || $partial) {\n if ($this->isNew()) {\n // return empty collection\n if (null === $this->collNarrationPlugins) {\n $this->initNarrationPlugins();\n }\n } else {\n\n $query = ChildPluginsQuery::create(null, $criteria)\n ->filterByNarrationIssue($this);\n $collNarrationPlugins = $query->find($con);\n if (null !== $criteria) {\n return $collNarrationPlugins;\n }\n\n if ($partial && $this->collNarrationPlugins) {\n //make sure that already added objects gets added to the list of the database.\n foreach ($this->collNarrationPlugins as $obj) {\n if (!$collNarrationPlugins->contains($obj)) {\n $collNarrationPlugins[] = $obj;\n }\n }\n }\n\n $this->collNarrationPlugins = $collNarrationPlugins;\n $this->collNarrationPluginsPartial = false;\n }\n }\n\n return $this->collNarrationPlugins;\n }", "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete;\n\n foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) {\n $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null);\n }\n\n $this->collLnkOperationPrimeRCountriess = null;\n foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) {\n $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries);\n }\n\n $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n\n return $this;\n }", "public function getCOMVendeurs(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collCOMVendeursPartial && !$this->isNew();\n if (null === $this->collCOMVendeurs || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collCOMVendeurs) {\n // return empty collection\n $this->initCOMVendeurs();\n } else {\n $collCOMVendeurs = ChildCOMVendeurQuery::create(null, $criteria)\n ->filterByCommande($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collCOMVendeursPartial && count($collCOMVendeurs)) {\n $this->initCOMVendeurs(false);\n\n foreach ($collCOMVendeurs as $obj) {\n if (false == $this->collCOMVendeurs->contains($obj)) {\n $this->collCOMVendeurs->append($obj);\n }\n }\n\n $this->collCOMVendeursPartial = true;\n }\n\n return $collCOMVendeurs;\n }\n\n if ($partial && $this->collCOMVendeurs) {\n foreach ($this->collCOMVendeurs as $obj) {\n if ($obj->isNew()) {\n $collCOMVendeurs[] = $obj;\n }\n }\n }\n\n $this->collCOMVendeurs = $collCOMVendeurs;\n $this->collCOMVendeursPartial = false;\n }\n }\n\n return $this->collCOMVendeurs;\n }", "public function getRIssuesSingleplugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collRIssuesSinglepluginsPartial && !$this->isNew();\n if (null === $this->collRIssuesSingleplugins || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collRIssuesSingleplugins) {\n // return empty collection\n $this->initRIssuesSingleplugins();\n } else {\n $collRIssuesSingleplugins = ChildRIssuesSinglepluginQuery::create(null, $criteria)\n ->filterBySingleIssue($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collRIssuesSinglepluginsPartial && count($collRIssuesSingleplugins)) {\n $this->initRIssuesSingleplugins(false);\n\n foreach ($collRIssuesSingleplugins as $obj) {\n if (false == $this->collRIssuesSingleplugins->contains($obj)) {\n $this->collRIssuesSingleplugins->append($obj);\n }\n }\n\n $this->collRIssuesSinglepluginsPartial = true;\n }\n\n return $collRIssuesSingleplugins;\n }\n\n if ($partial && $this->collRIssuesSingleplugins) {\n foreach ($this->collRIssuesSingleplugins as $obj) {\n if ($obj->isNew()) {\n $collRIssuesSingleplugins[] = $obj;\n }\n }\n }\n\n $this->collRIssuesSingleplugins = $collRIssuesSingleplugins;\n $this->collRIssuesSinglepluginsPartial = false;\n }\n }\n\n return $this->collRIssuesSingleplugins;\n }", "public function buildPkeyCriteria()\n {\n $criteria = ChildKluBillQuery::create();\n $criteria->add(KluBillTableMap::COL_ID, $this->id);\n\n return $criteria;\n }", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(C060InventarioPeer::DATABASE_NAME);\n\n\t\t$criteria->add(C060InventarioPeer::CO_NUM_INVENTARIO, $this->co_num_inventario);\n\n\t\treturn $criteria;\n\t}", "public function get_criteria() { return $this->criteria_list; }", "public function countLnkOperationPrimeRCountriess(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n return 0;\n }\n\n if ($partial && !$criteria) {\n return count($this->getLnkOperationPrimeRCountriess());\n }\n $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByOperationPrimes($this)\n ->count($con);\n }\n\n return count($this->collLnkOperationPrimeRCountriess);\n }", "public function getPermissaosRelatedByCoUsuarioAlteracao($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collPermissaosRelatedByCoUsuarioAlteracao || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collPermissaosRelatedByCoUsuarioAlteracao) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initPermissaosRelatedByCoUsuarioAlteracao();\n\t\t\t} else {\n\t\t\t\t$collPermissaosRelatedByCoUsuarioAlteracao = PermissaoQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuarioRelatedByCoUsuarioAlteracao($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collPermissaosRelatedByCoUsuarioAlteracao;\n\t\t\t\t}\n\t\t\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = $collPermissaosRelatedByCoUsuarioAlteracao;\n\t\t\t}\n\t\t}\n\t\treturn $this->collPermissaosRelatedByCoUsuarioAlteracao;\n\t}", "public function getColetaPesquisas($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collColetaPesquisas || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collColetaPesquisas) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initColetaPesquisas();\n\t\t\t} else {\n\t\t\t\t$collColetaPesquisas = ColetaPesquisaQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collColetaPesquisas;\n\t\t\t\t}\n\t\t\t\t$this->collColetaPesquisas = $collColetaPesquisas;\n\t\t\t}\n\t\t}\n\t\treturn $this->collColetaPesquisas;\n\t}", "public function initLnkOperationPrimeRCountriess($overrideExisting = true)\n {\n if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) {\n return;\n }\n $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection();\n $this->collLnkOperationPrimeRCountriess->setModel('LnkOperationPrimeRCountries');\n }", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(J019tParticipantesPeer::DATABASE_NAME);\n\n\t\t$criteria->add(J019tParticipantesPeer::CO_PARTICIPANTE, $this->co_participante);\n\n\t\treturn $criteria;\n\t}", "public function getComentarioNoticias($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collComentarioNoticias || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collComentarioNoticias) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initComentarioNoticias();\n\t\t\t} else {\n\t\t\t\t$collComentarioNoticias = ComentarioNoticiaQuery::create(null, $criteria)\n\t\t\t\t\t->filterByUsuario($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collComentarioNoticias;\n\t\t\t\t}\n\t\t\t\t$this->collComentarioNoticias = $collComentarioNoticias;\n\t\t\t}\n\t\t}\n\t\treturn $this->collComentarioNoticias;\n\t}", "public function getInappropriates($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PostPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collInappropriates === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collInappropriates = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(InappropriatePeer::POST_ID, $this->id);\n\n\t\t\t\tInappropriatePeer::addSelectColumns($criteria);\n\t\t\t\t$this->collInappropriates = InappropriatePeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(InappropriatePeer::POST_ID, $this->id);\n\n\t\t\t\tInappropriatePeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastInappropriateCriteria) || !$this->lastInappropriateCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collInappropriates = InappropriatePeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastInappropriateCriteria = $criteria;\n\t\treturn $this->collInappropriates;\n\t}", "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(FeatureCvtermPeer::DATABASE_NAME);\n $criteria->add(FeatureCvtermPeer::FEATURE_CVTERM_ID, $this->feature_cvterm_id);\n\n return $criteria;\n }", "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(CidadePeer::DATABASE_NAME);\n\t\t$criteria->add(CidadePeer::ID, $this->id);\n\n\t\treturn $criteria;\n\t}", "public function relCooperations() {\n return Job::query()\n ->join('ownership', 'ownership.tobjsid', 'jobs.sId')\n ->select('jobs.*')\n ->where('ownership.fobjsid', parent::__get('sId'))\n ->where('jobs.type', Job::TYPE_COOPERATION)\n ->get();\n }", "public function getAllPlugins(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collAllPluginsPartial && !$this->isNew();\n if (null === $this->collAllPlugins || null !== $criteria || $partial) {\n if ($this->isNew()) {\n // return empty collection\n if (null === $this->collAllPlugins) {\n $this->initAllPlugins();\n }\n } else {\n\n $query = ChildPluginsQuery::create(null, $criteria)\n ->filterByAllIssue($this);\n $collAllPlugins = $query->find($con);\n if (null !== $criteria) {\n return $collAllPlugins;\n }\n\n if ($partial && $this->collAllPlugins) {\n //make sure that already added objects gets added to the list of the database.\n foreach ($this->collAllPlugins as $obj) {\n if (!$collAllPlugins->contains($obj)) {\n $collAllPlugins[] = $obj;\n }\n }\n }\n\n $this->collAllPlugins = $collAllPlugins;\n $this->collAllPluginsPartial = false;\n }\n }\n\n return $this->collAllPlugins;\n }" ]
[ "0.65903765", "0.6560057", "0.628412", "0.61360604", "0.56110454", "0.5591172", "0.5567438", "0.5505992", "0.5469546", "0.54690737", "0.5392265", "0.53495556", "0.5338507", "0.5283804", "0.5222667", "0.52197963", "0.5208035", "0.52051127", "0.51970255", "0.51662004", "0.51526266", "0.51495665", "0.5146107", "0.5145501", "0.5138974", "0.51389503", "0.51361346", "0.5136115", "0.5134889", "0.513366" ]
0.77509034
0
Sets a collection of LnkOperationPrimeRCountries objects related by a onetomany relationship to the current object. It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.
public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null) { $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess); $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete; foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) { $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null); } $this->collLnkOperationPrimeRCountriess = null; foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) { $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries); } $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess; $this->collLnkOperationPrimeRCountriessPartial = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initLnkOperationPrimeRCountriess($overrideExisting = true)\n {\n if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) {\n return;\n }\n $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection();\n $this->collLnkOperationPrimeRCountriess->setModel('LnkOperationPrimeRCountries');\n }", "public function addLnkOperationPrimeRCountries(LnkOperationPrimeRCountries $l)\n {\n if ($this->collLnkOperationPrimeRCountriess === null) {\n $this->initLnkOperationPrimeRCountriess();\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n if (!in_array($l, $this->collLnkOperationPrimeRCountriess->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddLnkOperationPrimeRCountries($l);\n\n if ($this->lnkOperationPrimeRCountriessScheduledForDeletion and $this->lnkOperationPrimeRCountriessScheduledForDeletion->contains($l)) {\n $this->lnkOperationPrimeRCountriessScheduledForDeletion->remove($this->lnkOperationPrimeRCountriessScheduledForDeletion->search($l));\n }\n }\n\n return $this;\n }", "public function setRelations(Collection $relations);", "public function setRelations() {}", "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collOperationPrestationss) {\n foreach ($this->collOperationPrestationss as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collOperationScenariis) {\n foreach ($this->collOperationScenariis as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aOperations instanceof Persistent) {\n $this->aOperations->clearAllReferences($deep);\n }\n if ($this->aRCurrencies instanceof Persistent) {\n $this->aRCurrencies->clearAllReferences($deep);\n }\n if ($this->aRRewardTypes instanceof Persistent) {\n $this->aRRewardTypes->clearAllReferences($deep);\n }\n if ($this->aRRewardExpeditionModes instanceof Persistent) {\n $this->aRRewardExpeditionModes->clearAllReferences($deep);\n }\n if ($this->aRRewardTransporters instanceof Persistent) {\n $this->aRRewardTransporters->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collOperationPrestationss instanceof PropelCollection) {\n $this->collOperationPrestationss->clearIterator();\n }\n $this->collOperationPrestationss = null;\n if ($this->collOperationScenariis instanceof PropelCollection) {\n $this->collOperationScenariis->clearIterator();\n }\n $this->collOperationScenariis = null;\n if ($this->collLnkOperationPrimeRCountriess instanceof PropelCollection) {\n $this->collLnkOperationPrimeRCountriess->clearIterator();\n }\n $this->collLnkOperationPrimeRCountriess = null;\n $this->aOperations = null;\n $this->aRCurrencies = null;\n $this->aRRewardTypes = null;\n $this->aRRewardExpeditionModes = null;\n $this->aRRewardTransporters = null;\n }", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "function init()\n {\n foreach ($GLOBALS['_PX_models'] as $model=>$val) {\n if (isset($val['relate_to'])) {\n foreach ($val['relate_to'] as $related) {\n if ($this->_model == $related) {\n // The current model is related to $model\n // through one or more foreign key. We load\n // the $model to check on which fields the\n // foreign keys are set, as it is possible in\n // one model to have several foreign keys to\n // the same other model.\n if ($model != $this->_model) {\n $_m = new $model();\n $_fkeys = $_m->getForeignKeysToModel($this->_model);\n } else {\n $_fkeys = $this->getForeignKeysToModel($this->_model);\n }\n foreach ($_fkeys as $_fkey=>$_fkeyval) {\n //For each foreign key, we add the\n //get_xx_list method that can have a\n //custom name through the relate_name\n //value.\n if (isset($_fkeyval['relate_name'])) {\n $mname = $_fkeyval['relate_name'];\n } else {\n $mname = strtolower($model);\n }\n $this->_methods_list['get_'.$mname.'_list'] = array($model, $_fkey);\n }\n break;\n }\n }\n }\n if (isset($val['relate_to_many']) && \n in_array($this->_model, $val['relate_to_many'])) {\n $this->_methods_list['get_'.strtolower($model).'_list'] = $model;\n $this->_manytomany[$model] = 'manytomany';\n }\n }\n foreach ($this->_cols as $col=>$val) {\n $field = new $val['type']($col);\n if ($field->type == 'foreignkey') {\n $this->_methods_get['get_'.strtolower($col)] = array($val['model'], $col);\n $this->_fk[$col] = 'foreignkey';\n }\n if ($field->type == 'manytomany') {\n $this->_methods_list['get_'.strtolower($col).'_list'] = $val['model'];\n $this->_manytomany[$val['model']] = 'manytomany';\n }\n foreach ($field->add_methods as $method) {\n $this->_methods_extra[$method[0]] = array(strtolower($col), $method[1]);\n }\n }\n }", "private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $foreign_model = (is_array($relation)) ? $relation[0] : $relation;\n $foreign_model_name = strtolower($foreign_model);\n $this->load->model($foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n if($option=='has_many_pivot')\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n $foreign_key = (is_array($relation)) ? $relation[1] : $this->{$foreign_model_name}->primary;\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n else\n {\n $foreign_key = (is_array($relation)) ? $relation[1] : singular($this->table) . '_id';\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => $foreign_model_name, 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n ($option == 'has_many_pivot') ? ($this->_relationships[$key]['pivot_table'] = $pivot_table) : FALSE;\n\n }\n }\n }\n }\n }", "public function setRuangs(PropelCollection $ruangs, PropelPDO $con = null)\n {\n $ruangsToDelete = $this->getRuangs(new Criteria(), $con)->diff($ruangs);\n\n $this->ruangsScheduledForDeletion = unserialize(serialize($ruangsToDelete));\n\n foreach ($ruangsToDelete as $ruangRemoved) {\n $ruangRemoved->setBangunan(null);\n }\n\n $this->collRuangs = null;\n foreach ($ruangs as $ruang) {\n $this->addRuang($ruang);\n }\n\n $this->collRuangs = $ruangs;\n $this->collRuangsPartial = false;\n\n return $this;\n }", "public function setRecogidas(array $data, $deleteOrphans = false)\n {\n if ($deleteOrphans === true) {\n\n if ($this->_Recogidas === null) {\n\n $this->getRecogidas();\n }\n\n $oldRelations = $this->_Recogidas;\n\n if (is_array($oldRelations)) {\n\n $dataPKs = array();\n\n foreach ($data as $newItem) {\n\n $pk = $newItem->getPrimaryKey();\n if (!empty($pk)) {\n $dataPKs[] = $pk;\n }\n }\n\n foreach ($oldRelations as $oldItem) {\n\n if (!in_array($oldItem->getPrimaryKey(), $dataPKs)) {\n\n $this->_orphans[] = $oldItem;\n }\n }\n }\n }\n\n $this->_Recogidas = array();\n\n foreach ($data as $object) {\n $this->addRecogidas($object);\n }\n\n return $this;\n }", "public function buildRelations()\n {\n $this->addRelation('CiOptionsRelatedByIdOptionTipoAsociado', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_option_tipo_asociado',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdOptionNivelAsociado', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_option_nivel_asociado',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByInvitadoPor', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':invitado_por',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdOpcionRole', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_opcion_role',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('HbfTurnosRelatedByIdTurno', '\\\\HbfTurnos', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, null, false);\n $this->addRelation('HbfSesionesRelatedByIdSesion', '\\\\HbfSesiones', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdTipoUsuario', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_tipo_usuario',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('HbfClubsRelatedByIdClub', '\\\\HbfClubs', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_club',\n 1 => ':id_club',\n ),\n), null, null, null, false);\n $this->addRelation('CiModulosRelatedByIdUserCreated', '\\\\CiModulos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiModulossRelatedByIdUserCreated', false);\n $this->addRelation('CiModulosRelatedByIdUserModified', '\\\\CiModulos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiModulossRelatedByIdUserModified', false);\n $this->addRelation('CiOptionsRelatedByIdUserCreated', '\\\\CiOptions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiOptionssRelatedByIdUserCreated', false);\n $this->addRelation('CiOptionsRelatedByIdUserModified', '\\\\CiOptions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiOptionssRelatedByIdUserModified', false);\n $this->addRelation('CiSessions', '\\\\CiSessions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_usuario',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSessionss', false);\n $this->addRelation('CiSettingsRelatedByIdUserCreated', '\\\\CiSettings', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSettingssRelatedByIdUserCreated', false);\n $this->addRelation('CiSettingsRelatedByIdUserModified', '\\\\CiSettings', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSettingssRelatedByIdUserModified', false);\n $this->addRelation('CiUsuariosRelatedByIdUsuario', '\\\\CiUsuarios', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':invitado_por',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiUsuariossRelatedByIdUsuario', false);\n $this->addRelation('HbfClubsRelatedByIdUserCreated', '\\\\HbfClubs', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfClubssRelatedByIdUserCreated', false);\n $this->addRelation('HbfClubsRelatedByIdUserModified', '\\\\HbfClubs', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfClubssRelatedByIdUserModified', false);\n $this->addRelation('HbfComandasRelatedByIdUserCreated', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdUserCreated', false);\n $this->addRelation('HbfComandasRelatedByIdUserModified', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdUserModified', false);\n $this->addRelation('HbfComandasRelatedByIdCliente', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdCliente', false);\n $this->addRelation('HbfDetallesPedidosRelatedByIdUserCreated', '\\\\HbfDetallesPedidos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfDetallesPedidossRelatedByIdUserCreated', false);\n $this->addRelation('HbfDetallesPedidosRelatedByIdUserModified', '\\\\HbfDetallesPedidos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfDetallesPedidossRelatedByIdUserModified', false);\n $this->addRelation('HbfEgresosRelatedByIdUserCreated', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdUserCreated', false);\n $this->addRelation('HbfEgresosRelatedByIdUserModified', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdUserModified', false);\n $this->addRelation('HbfEgresosRelatedByIdCliente', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdCliente', false);\n $this->addRelation('HbfIngresosRelatedByIdUserCreated', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdUserCreated', false);\n $this->addRelation('HbfIngresosRelatedByIdUserModified', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdUserModified', false);\n $this->addRelation('HbfIngresosRelatedByIdCliente', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdCliente', false);\n $this->addRelation('HbfPorcionesRelatedByIdUserCreated', '\\\\HbfPorciones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPorcionessRelatedByIdUserCreated', false);\n $this->addRelation('HbfPorcionesRelatedByIdUserModified', '\\\\HbfPorciones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPorcionessRelatedByIdUserModified', false);\n $this->addRelation('HbfPrepagosRelatedByIdCliente', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdCliente', false);\n $this->addRelation('HbfPrepagosRelatedByIdUserCreated', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdUserCreated', false);\n $this->addRelation('HbfPrepagosRelatedByIdUserModified', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdUserModified', false);\n $this->addRelation('HbfProductosRelatedByIdUserCreated', '\\\\HbfProductos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfProductossRelatedByIdUserCreated', false);\n $this->addRelation('HbfProductosRelatedByIdUserModified', '\\\\HbfProductos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfProductossRelatedByIdUserModified', false);\n $this->addRelation('HbfSesionesRelatedByIdUserCreated', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdUserCreated', false);\n $this->addRelation('HbfSesionesRelatedByIdUserModified', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdUserModified', false);\n $this->addRelation('HbfSesionesRelatedByIdAsociado', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_asociado',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdAsociado', false);\n $this->addRelation('HbfTurnosRelatedByIdUserCreated', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdUserCreated', false);\n $this->addRelation('HbfTurnosRelatedByIdUserModified', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdUserModified', false);\n $this->addRelation('HbfTurnosRelatedByIdAsociado', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_asociado',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdAsociado', false);\n $this->addRelation('HbfVasosRelatedByIdUserModified', '\\\\HbfVasos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), 'CASCADE', 'CASCADE', 'HbfVasossRelatedByIdUserModified', false);\n $this->addRelation('HbfVasosRelatedByIdUserCreated', '\\\\HbfVasos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), 'CASCADE', 'CASCADE', 'HbfVasossRelatedByIdUserCreated', false);\n $this->addRelation('HbfVentasRelatedByIdUserCreated', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdUserCreated', false);\n $this->addRelation('HbfVentasRelatedByIdUserModified', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdUserModified', false);\n $this->addRelation('HbfVentasRelatedByIdCliente', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdCliente', false);\n }", "public function buildRelations()\n {\n $this->addRelation('Evaluacion', '\\\\Evaluacion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_evaluacion',\n 1 => ':eval_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Objetivo', '\\\\Objetivo', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_objetivo',\n 1 => ':obje_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_pregunta',\n 1 => ':preg_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Seccion', '\\\\Seccion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_seccion',\n 1 => ':secc_codigo',\n ),\n), null, 'CASCADE', null, false);\n }", "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in \".$this->getClassNameFromBuilder($joinedTableTableMapBuilder).\" instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n EmailManagerHistoryEmailTableMap::clearInstancePool();\n }", "protected function addActionsForRelatedEntities()\n {\n if (! $this->mapper) {\n return;\n }\n\n foreach ($this->mapper->getRelations() as $name) {\n $this->mapper->getRelation($name)->addActions($this);\n }\n }", "public function setOperationScenariis(PropelCollection $operationScenariis, PropelPDO $con = null)\n {\n $operationScenariisToDelete = $this->getOperationScenariis(new Criteria(), $con)->diff($operationScenariis);\n\n\n $this->operationScenariisScheduledForDeletion = $operationScenariisToDelete;\n\n foreach ($operationScenariisToDelete as $operationScenariiRemoved) {\n $operationScenariiRemoved->setOperationPrimes(null);\n }\n\n $this->collOperationScenariis = null;\n foreach ($operationScenariis as $operationScenarii) {\n $this->addOperationScenarii($operationScenarii);\n }\n\n $this->collOperationScenariis = $operationScenariis;\n $this->collOperationScenariisPartial = false;\n\n return $this;\n }", "public function reload($deep = false, PropelPDO $con = null)\n {\n if ($this->isDeleted()) {\n throw new PropelException(\"Cannot reload a deleted object.\");\n }\n\n if ($this->isNew()) {\n throw new PropelException(\"Cannot reload an unsaved object.\");\n }\n\n if ($con === null) {\n $con = Propel::getConnection(OperationPrimesPeer::DATABASE_NAME, Propel::CONNECTION_READ);\n }\n\n // We don't need to alter the object instance pool; we're just modifying this instance\n // already in the pool.\n\n $stmt = OperationPrimesPeer::doSelectStmt($this->buildPkeyCriteria(), $con);\n $row = $stmt->fetch(PDO::FETCH_NUM);\n $stmt->closeCursor();\n if (!$row) {\n throw new PropelException('Cannot find matching row in the database to reload object values.');\n }\n $this->hydrate($row, 0, true); // rehydrate\n\n if ($deep) { // also de-associate any related objects?\n\n $this->aOperations = null;\n $this->aRCurrencies = null;\n $this->aRRewardTypes = null;\n $this->aRRewardExpeditionModes = null;\n $this->aRRewardTransporters = null;\n $this->collOperationPrestationss = null;\n\n $this->collOperationScenariis = null;\n\n $this->collLnkOperationPrimeRCountriess = null;\n\n } // if (deep)\n }", "public function buildRelations()\n\t{\n $this->addRelation('Tbnecesespecial', 'Tbnecesespecial', RelationMap::MANY_TO_ONE, array('id_neces_especial' => 'id_neces_especial', ), null, null);\n $this->addRelation('Tbcidade', 'Tbcidade', RelationMap::MANY_TO_ONE, array('naturalidade' => 'id_cidade', ), null, null);\n $this->addRelation('Tbpais', 'Tbpais', RelationMap::MANY_TO_ONE, array('nacionalidade' => 'id_pais', ), null, null);\n $this->addRelation('TblogradouroRelatedByCep', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep' => 'cep', ), null, null);\n $this->addRelation('Tbcursoversao', 'Tbcursoversao', RelationMap::MANY_TO_ONE, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbtipoingresso', 'Tbtipoingresso', RelationMap::MANY_TO_ONE, array('id_tipo_ingresso' => 'id_tipo_ingresso', ), null, null);\n $this->addRelation('Tbalunosituacao', 'Tbalunosituacao', RelationMap::MANY_TO_ONE, array('id_situacao' => 'id_situacao', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdDestino', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_destino' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById2grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_2grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById3grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_3grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdTrabalho', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_trabalho' => 'id_inst_externa', ), null, null);\n $this->addRelation('TblogradouroRelatedByCepTrabalho', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep_trabalho' => 'cep', ), null, null);\n $this->addRelation('Tbpolos', 'Tbpolos', RelationMap::MANY_TO_ONE, array('id_polo' => 'id_polo', ), null, null);\n $this->addRelation('Tbalunoracacor', 'Tbalunoracacor', RelationMap::MANY_TO_ONE, array('id_raca' => 'id_raca', ), null, null);\n $this->addRelation('Tbpendencia', 'Tbpendencia', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunodiploma', 'Tbalunodiploma', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosenha', 'Tbalunosenha', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosolicitacao', 'Tbalunosolicitacao', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbbanca', 'Tbbanca', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbfila', 'Tbfila', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbhistorico', 'Tbhistorico', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('TbturmaAluno', 'TbturmaAluno', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n\t}", "public function setCriteriaCollection(CriteriaCollection $collection);", "public function setRIssuesAllplugins(Collection $rIssuesAllplugins, ConnectionInterface $con = null)\n {\n /** @var ChildRIssuesAllplugin[] $rIssuesAllpluginsToDelete */\n $rIssuesAllpluginsToDelete = $this->getRIssuesAllplugins(new Criteria(), $con)->diff($rIssuesAllplugins);\n\n\n //since at least one column in the foreign key is at the same time a PK\n //we can not just set a PK to NULL in the lines below. We have to store\n //a backup of all values, so we are able to manipulate these items based on the onDelete value later.\n $this->rIssuesAllpluginsScheduledForDeletion = clone $rIssuesAllpluginsToDelete;\n\n foreach ($rIssuesAllpluginsToDelete as $rIssuesAllpluginRemoved) {\n $rIssuesAllpluginRemoved->setAllIssue(null);\n }\n\n $this->collRIssuesAllplugins = null;\n foreach ($rIssuesAllplugins as $rIssuesAllplugin) {\n $this->addRIssuesAllplugin($rIssuesAllplugin);\n }\n\n $this->collRIssuesAllplugins = $rIssuesAllplugins;\n $this->collRIssuesAllpluginsPartial = false;\n\n return $this;\n }", "public function buildRelations()\n {\n $this->addRelation('Attendance', '\\\\lwops\\\\lwops\\\\Attendance', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Attendances', false);\n $this->addRelation('Casualemployeepayslip', '\\\\lwops\\\\lwops\\\\Casualemployeepayslip', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Casualemployeepayslips', false);\n $this->addRelation('Employeeloan', '\\\\lwops\\\\lwops\\\\Employeeloan', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeloans', false);\n $this->addRelation('Employeeotherdeduction', '\\\\lwops\\\\lwops\\\\Employeeotherdeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeotherdeductions', false);\n $this->addRelation('Employeepurchases', '\\\\lwops\\\\lwops\\\\Employeepurchases', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeepurchasess', false);\n $this->addRelation('Employeerole', '\\\\lwops\\\\lwops\\\\Employeerole', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeroles', false);\n $this->addRelation('Employeesalaryexpenseallocation', '\\\\lwops\\\\lwops\\\\Employeesalaryexpenseallocation', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeesalaryexpenseallocations', false);\n $this->addRelation('Employeetermination', '\\\\lwops\\\\lwops\\\\Employeetermination', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeterminations', false);\n $this->addRelation('Fteemployeepayslip', '\\\\lwops\\\\lwops\\\\Fteemployeepayslip', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Fteemployeepayslips', false);\n $this->addRelation('Ftesalaryadvance', '\\\\lwops\\\\lwops\\\\Ftesalaryadvance', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Ftesalaryadvances', false);\n $this->addRelation('Medicaldeduction', '\\\\lwops\\\\lwops\\\\Medicaldeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Medicaldeductions', false);\n $this->addRelation('Nssfdeduction', '\\\\lwops\\\\lwops\\\\Nssfdeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Nssfdeductions', false);\n $this->addRelation('Parttimedetail', '\\\\lwops\\\\lwops\\\\Parttimedetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Parttimedetails', false);\n $this->addRelation('Salary', '\\\\lwops\\\\lwops\\\\Salary', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Salaries', false);\n }", "public function initInappropriates()\n\t{\n\t\t$this->collInappropriates = array();\n\t}", "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collPermissaosRelatedByCoUsuarioAlteracao) {\n\t\t\t\tforeach ($this->collPermissaosRelatedByCoUsuarioAlteracao as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collPermissaosRelatedByCoUsuarioCadastro) {\n\t\t\t\tforeach ($this->collPermissaosRelatedByCoUsuarioCadastro as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collRlUsuarioOrgaos) {\n\t\t\t\tforeach ($this->collRlUsuarioOrgaos as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTbDescricaoChamados) {\n\t\t\t\tforeach ($this->collTbDescricaoChamados as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collUsuarioCategorias) {\n\t\t\t\tforeach ($this->collUsuarioCategorias as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collUsuarioTarefas) {\n\t\t\t\tforeach ($this->collUsuarioTarefas as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\tif ($this->collPermissaosRelatedByCoUsuarioAlteracao instanceof PropelCollection) {\n\t\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao->clearIterator();\n\t\t}\n\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = null;\n\t\tif ($this->collPermissaosRelatedByCoUsuarioCadastro instanceof PropelCollection) {\n\t\t\t$this->collPermissaosRelatedByCoUsuarioCadastro->clearIterator();\n\t\t}\n\t\t$this->collPermissaosRelatedByCoUsuarioCadastro = null;\n\t\tif ($this->collRlUsuarioOrgaos instanceof PropelCollection) {\n\t\t\t$this->collRlUsuarioOrgaos->clearIterator();\n\t\t}\n\t\t$this->collRlUsuarioOrgaos = null;\n\t\tif ($this->collTbDescricaoChamados instanceof PropelCollection) {\n\t\t\t$this->collTbDescricaoChamados->clearIterator();\n\t\t}\n\t\t$this->collTbDescricaoChamados = null;\n\t\tif ($this->collUsuarioCategorias instanceof PropelCollection) {\n\t\t\t$this->collUsuarioCategorias->clearIterator();\n\t\t}\n\t\t$this->collUsuarioCategorias = null;\n\t\tif ($this->collUsuarioTarefas instanceof PropelCollection) {\n\t\t\t$this->collUsuarioTarefas->clearIterator();\n\t\t}\n\t\t$this->collUsuarioTarefas = null;\n\t\t$this->aPerfil = null;\n\t}", "public function initPermissaosRelatedByCoUsuarioAlteracao($overrideExisting = true)\n\t{\n\t\tif (null !== $this->collPermissaosRelatedByCoUsuarioAlteracao && !$overrideExisting) {\n\t\t\treturn;\n\t\t}\n\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = new PropelObjectCollection();\n\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao->setModel('Permissao');\n\t}", "public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n // return empty collection\n $this->initLnkOperationPrimeRCountriess();\n } else {\n $collLnkOperationPrimeRCountriess = LnkOperationPrimeRCountriesQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collLnkOperationPrimeRCountriessPartial && count($collLnkOperationPrimeRCountriess)) {\n $this->initLnkOperationPrimeRCountriess(false);\n\n foreach ($collLnkOperationPrimeRCountriess as $obj) {\n if (false == $this->collLnkOperationPrimeRCountriess->contains($obj)) {\n $this->collLnkOperationPrimeRCountriess->append($obj);\n }\n }\n\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n $collLnkOperationPrimeRCountriess->getInternalIterator()->rewind();\n\n return $collLnkOperationPrimeRCountriess;\n }\n\n if ($partial && $this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $obj) {\n if ($obj->isNew()) {\n $collLnkOperationPrimeRCountriess[] = $obj;\n }\n }\n }\n\n $this->collLnkOperationPrimeRCountriess = $collLnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n }\n }\n\n return $this->collLnkOperationPrimeRCountriess;\n }", "protected function buildRelations()\n {\n if ($this->relations_built) {\n return;\n }\n $this_class = $this->base_class;\n\n foreach ($this_class::$relations as $field => $options) {\n $object = null;\n\n $target_class = $options['rel_class'];\n\n // Segun el lugar de la llave foránea, creamos el objeto\n if ($options['fk_location'] == self::FK_THIS) {\n // Si existe la llave foranea, y tiene un valor\n if (isset($this->fields[$options['foreing_key']])) {\n if ($options['rel_type'] == 'one') {\n $object = $target_class::get(\n $this->fields[$options['foreing_key']]\n );\n } else {\n throw new \\LogicException (\"UNIMPLEMENTED FK_THIS with 'many'\");\n }\n } else {\n // No existe la llave. Creamos objetos vacíos\n if ($options['rel_type'] == 'one') {\n $object = new $target_class;\n } else {\n throw new \\LogicException (\"UNIMPLEMENTED FK_THIS with 'many'\");\n }\n }\n } else {\n // La llave foránea está en el target_class\n if ($options['rel_type'] == 'one') {\n $object = $target_class::get([\n $options['foreing_key'] => $this->fields[$options['primary_key']]\n ]);\n } else {\n $object = new RecordSet($target_class, \n [$options['foreing_key'] => $this->fields[$options['primary_key']]]);\n }\n\n\n }\n //var_dump($object); exit;\n\n\n $this->object_fields[$field] = $object;\n }\n }", "public static function clearRelatedInstancePool()\n\t{\n\t\t// invalidate objects in TbturmaProfessorPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tTbturmaProfessorPeer::clearInstancePool();\n\n\t}", "public function setRelations(Notification $notification, Collection $entities)\n {\n $entities->each(function ($entity) use ($notification) {\n $entity->notifications()->attach($notification->id);\n });\n }", "public function setOneToManyRelations($scope, $oneId, array $manyIds)\n {\n\n $relation = strtolower($scope);\n $relation_singular = substr($relation, 0, -1);\n\n $one = $this->getRequestedObject($oneId, [\n 'includes' => [$relation]\n ]);\n\n\n $currentManys = $one->{$relation}->pluck($relation_singular . '_uuid')->toArray();\n $manys = $this->checkValidityOfOneToManyRelations($scope, $manyIds);\n\n $remove = array_diff($currentManys, $manyIds);\n $add = array_diff($manyIds, $currentManys);\n\n $remove = $this->mapNamesToIds($scope, $remove);\n $add = $this->mapNamesToIds($scope, $add);\n\n\n // ~ $this->userRepository->setGroups($user, $add, $remove);\n $this->{$this->scope . 'Repository'}->{'set' . $scope}($one, $add, $remove);\n\n $one->setRelation($relation, new Collection($manys));\n\n return $one;\n }", "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collMonths) {\n foreach ($this->collMonths as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collFileCats) {\n foreach ($this->collFileCats as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collDocCats) {\n foreach ($this->collDocCats as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collBookks) {\n foreach ($this->collBookks as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collAccounts) {\n foreach ($this->collAccounts as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collReports) {\n foreach ($this->collReports as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collProjects) {\n foreach ($this->collProjects as $o) {\n $o->clearAllReferences($deep);\n }\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collMonths instanceof PropelCollection) {\n $this->collMonths->clearIterator();\n }\n $this->collMonths = null;\n if ($this->collFileCats instanceof PropelCollection) {\n $this->collFileCats->clearIterator();\n }\n $this->collFileCats = null;\n if ($this->collDocCats instanceof PropelCollection) {\n $this->collDocCats->clearIterator();\n }\n $this->collDocCats = null;\n if ($this->collBookks instanceof PropelCollection) {\n $this->collBookks->clearIterator();\n }\n $this->collBookks = null;\n if ($this->collAccounts instanceof PropelCollection) {\n $this->collAccounts->clearIterator();\n }\n $this->collAccounts = null;\n if ($this->collReports instanceof PropelCollection) {\n $this->collReports->clearIterator();\n }\n $this->collReports = null;\n if ($this->collProjects instanceof PropelCollection) {\n $this->collProjects->clearIterator();\n }\n $this->collProjects = null;\n }" ]
[ "0.53294456", "0.5276085", "0.5172079", "0.5024019", "0.49761328", "0.49010965", "0.49010965", "0.4842405", "0.4815598", "0.47761714", "0.47132882", "0.46900707", "0.46638405", "0.46614772", "0.46549684", "0.46372625", "0.46216393", "0.4613934", "0.46029884", "0.46000704", "0.45589936", "0.4549258", "0.45466036", "0.45077172", "0.45026615", "0.4470619", "0.44603387", "0.44547704", "0.4449982", "0.44425192" ]
0.6124001
0
Returns the number of related LnkOperationPrimeRCountries objects.
public function countLnkOperationPrimeRCountriess(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew(); if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) { return 0; } if ($partial && !$criteria) { return count($this->getLnkOperationPrimeRCountriess()); } $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterByOperationPrimes($this) ->count($con); } return count($this->collLnkOperationPrimeRCountriess); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return count($this->_mappersByPriority);\n }", "function getAllNumNodes(){\n\t\t$clase=$this->nmclass;\n\t\t$u=$this->cant_nodos;\n\t\treturn $u;\n\t}", "static public function rrcnt( object $pp1, string $tbl, array $other=[] ): int { \n self::$pp1 = $pp1 ;\n if (isset($pp1->shared_dbadapter_obj)) self::$utldb = $pp1->shared_dbadapter_obj ;\n\n $rcnt = self::$utldb::rrcount($tbl) ;\n return (int)$rcnt ;\n //return (int)utl::escp($rcnt) ;\n }", "public function getCompCount()\n {\n return $this->count(self::_COMP);\n }", "public function getReferenceCount() {}", "public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n // return empty collection\n $this->initLnkOperationPrimeRCountriess();\n } else {\n $collLnkOperationPrimeRCountriess = LnkOperationPrimeRCountriesQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collLnkOperationPrimeRCountriessPartial && count($collLnkOperationPrimeRCountriess)) {\n $this->initLnkOperationPrimeRCountriess(false);\n\n foreach ($collLnkOperationPrimeRCountriess as $obj) {\n if (false == $this->collLnkOperationPrimeRCountriess->contains($obj)) {\n $this->collLnkOperationPrimeRCountriess->append($obj);\n }\n }\n\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n $collLnkOperationPrimeRCountriess->getInternalIterator()->rewind();\n\n return $collLnkOperationPrimeRCountriess;\n }\n\n if ($partial && $this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $obj) {\n if ($obj->isNew()) {\n $collLnkOperationPrimeRCountriess[] = $obj;\n }\n }\n }\n\n $this->collLnkOperationPrimeRCountriess = $collLnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n }\n }\n\n return $this->collLnkOperationPrimeRCountriess;\n }", "function get_all_pelanggan_count()\n {\n $this->db->from('pelanggan');\n return $this->db->count_all_results();\n }", "public static function nombreAssociations() {\n $req = 'SELECT COUNT(*)\n FROM association_vehicule_conducteur';\n return Db::dbQuery($req);\n }", "public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_profile_publications($this->get_condition());\r\n }", "public function getPromotionsCount()\n {\n return $this->count(self::promotions);\n }", "public function nbLangues()\r\n\t\t{\r\n\t\treturn $this->lesLangues->count();\r\n\t\t}", "public function countAncestors();", "public function countLigne_equipe_personne(){\n\t\t\t\t\t return count($this->listeLigne_equipe_personne());\n\t\t\t\t\t }", "public function countTriples()\n {\n $count = 0;\n foreach ($this->index as $resource) {\n foreach ($resource as $values) {\n $count += count($values);\n }\n }\n return $count;\n }", "function getNbProduits() {\n\t return $this->nbProduits;\n\t }", "function getCount() {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$query = clone $this->_query;\n\t\t$query->column(\"COUNT(DISTINCT $i.node_id)\");\n\n\t\t$persistent = $this->_storage->getPersistentStorage();\n\t\t$database = $persistent->getDatabase();\n\t\treturn $database->getOne($query->toString());\n\t}", "public function getRankListCount()\n {\n return $this->count(self::_RANK_LIST);\n }", "public function nbProduits(){\n\treturn count($this->listeProduits);\n }", "public function getLootsCount()\n {\n return $this->count(self::_LOOTS);\n }", "public function getLootsCount()\n {\n return $this->count(self::_LOOTS);\n }", "public function getLootsCount()\n {\n return $this->count(self::_LOOTS);\n }", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_photo_gallery_publications($this->get_condition());\r\n }", "public function count() {\r\n if (is_null($this->objectcount)) {\r\n $this->fetchData();\r\n }\r\n return $this->objectcount;\r\n }", "public static function getCount()\n\t{\n\t\treturn self::find()->count();\n\t}", "public function getOperationsCount()\n {\n return $this->count(self::_OPERATIONS);\n }", "public function addLnkOperationPrimeRCountries(LnkOperationPrimeRCountries $l)\n {\n if ($this->collLnkOperationPrimeRCountriess === null) {\n $this->initLnkOperationPrimeRCountriess();\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n if (!in_array($l, $this->collLnkOperationPrimeRCountriess->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddLnkOperationPrimeRCountries($l);\n\n if ($this->lnkOperationPrimeRCountriessScheduledForDeletion and $this->lnkOperationPrimeRCountriessScheduledForDeletion->contains($l)) {\n $this->lnkOperationPrimeRCountriessScheduledForDeletion->remove($this->lnkOperationPrimeRCountriessScheduledForDeletion->search($l));\n }\n }\n\n return $this;\n }", "private static function getNumberOfPKs(string $type): int {\n if (!isset(self::$numPkKeys[$type])) {\n $numPKs = 1;\n $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');\n if ($persistenceFacade->isKnownType($type)) {\n $mapper = $persistenceFacade->getMapper($type);\n $numPKs = sizeof($mapper->getPKNames());\n }\n self::$numPkKeys[$type] = $numPKs;\n }\n return self::$numPkKeys[$type];\n }", "public static function getCount()\n {\n return static::find()->count();\n }", "public abstract function countObjects();" ]
[ "0.56959254", "0.56481504", "0.5630712", "0.56275594", "0.5590137", "0.5587153", "0.5585118", "0.5566324", "0.5562667", "0.5561838", "0.55585283", "0.55396694", "0.5515096", "0.5483477", "0.54697376", "0.5464577", "0.5461492", "0.5453932", "0.54340005", "0.54080826", "0.54080826", "0.54071736", "0.537532", "0.5374504", "0.5349476", "0.5346528", "0.5341088", "0.5340593", "0.53382283", "0.5313409" ]
0.7116602
0
Method called to associate a LnkOperationPrimeRCountries object to this object through the LnkOperationPrimeRCountries foreign key attribute.
public function addLnkOperationPrimeRCountries(LnkOperationPrimeRCountries $l) { if ($this->collLnkOperationPrimeRCountriess === null) { $this->initLnkOperationPrimeRCountriess(); $this->collLnkOperationPrimeRCountriessPartial = true; } if (!in_array($l, $this->collLnkOperationPrimeRCountriess->getArrayCopy(), true)) { // only add it if the **same** object is not already associated $this->doAddLnkOperationPrimeRCountries($l); if ($this->lnkOperationPrimeRCountriessScheduledForDeletion and $this->lnkOperationPrimeRCountriessScheduledForDeletion->contains($l)) { $this->lnkOperationPrimeRCountriessScheduledForDeletion->remove($this->lnkOperationPrimeRCountriessScheduledForDeletion->search($l)); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initLnkOperationPrimeRCountriess($overrideExisting = true)\n {\n if (null !== $this->collLnkOperationPrimeRCountriess && !$overrideExisting) {\n return;\n }\n $this->collLnkOperationPrimeRCountriess = new PropelObjectCollection();\n $this->collLnkOperationPrimeRCountriess->setModel('LnkOperationPrimeRCountries');\n }", "public function setLnkOperationPrimeRCountriess(PropelCollection $lnkOperationPrimeRCountriess, PropelPDO $con = null)\n {\n $lnkOperationPrimeRCountriessToDelete = $this->getLnkOperationPrimeRCountriess(new Criteria(), $con)->diff($lnkOperationPrimeRCountriess);\n\n\n $this->lnkOperationPrimeRCountriessScheduledForDeletion = $lnkOperationPrimeRCountriessToDelete;\n\n foreach ($lnkOperationPrimeRCountriessToDelete as $lnkOperationPrimeRCountriesRemoved) {\n $lnkOperationPrimeRCountriesRemoved->setOperationPrimes(null);\n }\n\n $this->collLnkOperationPrimeRCountriess = null;\n foreach ($lnkOperationPrimeRCountriess as $lnkOperationPrimeRCountries) {\n $this->addLnkOperationPrimeRCountries($lnkOperationPrimeRCountries);\n }\n\n $this->collLnkOperationPrimeRCountriess = $lnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n\n return $this;\n }", "public function getLnkOperationPrimeRCountriess($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n // return empty collection\n $this->initLnkOperationPrimeRCountriess();\n } else {\n $collLnkOperationPrimeRCountriess = LnkOperationPrimeRCountriesQuery::create(null, $criteria)\n ->filterByOperationPrimes($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collLnkOperationPrimeRCountriessPartial && count($collLnkOperationPrimeRCountriess)) {\n $this->initLnkOperationPrimeRCountriess(false);\n\n foreach ($collLnkOperationPrimeRCountriess as $obj) {\n if (false == $this->collLnkOperationPrimeRCountriess->contains($obj)) {\n $this->collLnkOperationPrimeRCountriess->append($obj);\n }\n }\n\n $this->collLnkOperationPrimeRCountriessPartial = true;\n }\n\n $collLnkOperationPrimeRCountriess->getInternalIterator()->rewind();\n\n return $collLnkOperationPrimeRCountriess;\n }\n\n if ($partial && $this->collLnkOperationPrimeRCountriess) {\n foreach ($this->collLnkOperationPrimeRCountriess as $obj) {\n if ($obj->isNew()) {\n $collLnkOperationPrimeRCountriess[] = $obj;\n }\n }\n }\n\n $this->collLnkOperationPrimeRCountriess = $collLnkOperationPrimeRCountriess;\n $this->collLnkOperationPrimeRCountriessPartial = false;\n }\n }\n\n return $this->collLnkOperationPrimeRCountriess;\n }", "public function countLnkOperationPrimeRCountriess(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n {\n $partial = $this->collLnkOperationPrimeRCountriessPartial && !$this->isNew();\n if (null === $this->collLnkOperationPrimeRCountriess || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collLnkOperationPrimeRCountriess) {\n return 0;\n }\n\n if ($partial && !$criteria) {\n return count($this->getLnkOperationPrimeRCountriess());\n }\n $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByOperationPrimes($this)\n ->count($con);\n }\n\n return count($this->collLnkOperationPrimeRCountriess);\n }", "public function clearLnkOperationPrimeRCountriess()\n {\n $this->collLnkOperationPrimeRCountriess = null; // important to set this to null since that means it is uninitialized\n $this->collLnkOperationPrimeRCountriessPartial = null;\n\n return $this;\n }", "public function getLnkOperationPrimeRCountriessJoinRCountries($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = LnkOperationPrimeRCountriesQuery::create(null, $criteria);\n $query->joinWith('RCountries', $join_behavior);\n\n return $this->getLnkOperationPrimeRCountriess($query, $con);\n }", "public function setOpPrimeLibelle($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->op_prime_libelle !== $v) {\n $this->op_prime_libelle = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_LIBELLE;\n }\n\n\n return $this;\n }", "public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)\n {\n $keys = OperationPrimesPeer::getFieldNames($keyType);\n\n if (array_key_exists($keys[0], $arr)) $this->setOpPrimeId($arr[$keys[0]]);\n if (array_key_exists($keys[1], $arr)) $this->setOpId($arr[$keys[1]]);\n if (array_key_exists($keys[2], $arr)) $this->setOpPrimeLibelle($arr[$keys[2]]);\n if (array_key_exists($keys[3], $arr)) $this->setOpPrimeNumero($arr[$keys[3]]);\n if (array_key_exists($keys[4], $arr)) $this->setGdlArtId($arr[$keys[4]]);\n if (array_key_exists($keys[5], $arr)) $this->setOperationPrimeCurrencyId($arr[$keys[5]]);\n if (array_key_exists($keys[6], $arr)) $this->setOperationPrimeRRewardTypeId($arr[$keys[6]]);\n if (array_key_exists($keys[7], $arr)) $this->setOperationPrimeRRewardExpeditionModeId($arr[$keys[7]]);\n if (array_key_exists($keys[8], $arr)) $this->setOperationPrimeRRewardTransporterId($arr[$keys[8]]);\n if (array_key_exists($keys[9], $arr)) $this->setOperationPrimeFixedAmount($arr[$keys[9]]);\n if (array_key_exists($keys[10], $arr)) $this->setOperationPrimeProductPricePourcentage($arr[$keys[10]]);\n if (array_key_exists($keys[11], $arr)) $this->setOperationPrimeMaximumAmount($arr[$keys[11]]);\n }", "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n\n return $criteria;\n }", "public function setOperationPrimeCurrencyId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->operation_prime_currency_id !== $v) {\n $this->operation_prime_currency_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID;\n }\n\n if ($this->aRCurrencies !== null && $this->aRCurrencies->getRCurrencyId() !== $v) {\n $this->aRCurrencies = null;\n }\n\n\n return $this;\n }", "public function setOpPrimeId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->op_prime_id !== $v) {\n $this->op_prime_id = $v;\n $this->modifiedColumns[] = OperationPrimesPeer::OP_PRIME_ID;\n }\n\n\n return $this;\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(OperationPrimesPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_ID)) $criteria->add(OperationPrimesPeer::OP_PRIME_ID, $this->op_prime_id);\n if ($this->isColumnModified(OperationPrimesPeer::OP_ID)) $criteria->add(OperationPrimesPeer::OP_ID, $this->op_id);\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_LIBELLE)) $criteria->add(OperationPrimesPeer::OP_PRIME_LIBELLE, $this->op_prime_libelle);\n if ($this->isColumnModified(OperationPrimesPeer::OP_PRIME_NUMERO)) $criteria->add(OperationPrimesPeer::OP_PRIME_NUMERO, $this->op_prime_numero);\n if ($this->isColumnModified(OperationPrimesPeer::GDL_ART_ID)) $criteria->add(OperationPrimesPeer::GDL_ART_ID, $this->gdl_art_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_CURRENCY_ID, $this->operation_prime_currency_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TYPE_ID, $this->operation_prime_r_reward_type_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_EXPEDITION_MODE_ID, $this->operation_prime_r_reward_expedition_mode_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_R_REWARD_TRANSPORTER_ID, $this->operation_prime_r_reward_transporter_id);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_FIXED_AMOUNT, $this->operation_prime_fixed_amount);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_PRODUCT_PRICE_POURCENTAGE, $this->operation_prime_product_price_pourcentage);\n if ($this->isColumnModified(OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT)) $criteria->add(OperationPrimesPeer::OPERATION_PRIME_MAXIMUM_AMOUNT, $this->operation_prime_maximum_amount);\n\n return $criteria;\n }", "public function add(RP $rp) {\n if (($pos = array_search($rp->team, $this->teams)) === false) {\n $this->teams[] = $rp->team;\n $pos = count($this->teams) - 1;\n }\n $this->rps[$pos][(string)$rp->division][$rp->boat_role][] = $rp;\n }", "public function getOperationPrimeCurrencyId()\n {\n\n return $this->operation_prime_currency_id;\n }", "public function getIntegranteInternoPes()\n {\n return $this->hasMany(IntegranteInternoPe::className(), ['funcion_p' => 'id_extension']);\n }", "public function setNbrOperations(?string $nbrOperations): LettresMissionsLignes {\n $this->nbrOperations = $nbrOperations;\n return $this;\n }", "public function getOpPrimeLibelle()\n {\n\n return $this->op_prime_libelle;\n }", "public function getOpPrimeId()\n {\n\n return $this->op_prime_id;\n }", "protected function insert() {\n $this->repo_id = $this->repository->repo_id; // for drupal_write_record() only\n\n if (isset($this->label_id)) {\n // The label already exists in the database, update the record.\n drupal_write_record('versioncontrol_labels', $this, 'label_id');\n }\n else {\n // The label does not yet exist, create it.\n // drupal_write_record() also assigns the new id to $this->label_id.\n drupal_write_record('versioncontrol_labels', $this);\n }\n unset($this->repo_id);\n }", "function\tassignERPNos( $_key=\"\", $_id=-1, $_val=\"\") {\n\t\ttry {\n\t\t\tif ( $this->SupplierPrefix == \"\") {\n\t\t\t\t$e\t=\t\"Supplier.php::Supplier::assignERPNos(...): supplier does not have prefix assigned\" ;\n\t\t\t\terror_log( $e) ;\n\t\t\t\tthrow new Exception( $e) ;\n\t\t\t}\n\t\t\tif ( $this->ERPNoStart == \"\") {\n\t\t\t\t$e\t=\t\"Supplier.php::Supplier::assignERPNos(...): supplier does not have vallid ERP no. range\" ;\n\t\t\t\terror_log( $e) ;\n\t\t\t\tthrow new Exception( $e) ;\n\t\t\t}\n\t\t\t$myArticle\t=\tnew Article() ;\n\t\t\tfor ( $myArticle->_firstFromDb( \"ArticleNr like '\" . $this->SupplierPrefix . \".%' AND ERPNo = '' \") ;\n\t\t\t\t\t$myArticle->_valid ;\n\t\t\t\t\t$myArticle->_firstFromDb( \"ArticleNr like '\" . $this->SupplierPrefix . \".%' AND ERPNo = '' \")) {\n\t\t\t\tFDbg::dumpL( \"0x00000002\", \"Supplier.php::Supplier::assignERPNo(...): current article no. '$myArticle->ArticleNr'\") ;\n\t\t\t\ttry {\n\t\t\t\t\t$erpNoStart\t=\t$this->ERPNoStart ;\n\t\t\t\t\t$erpNoEnd\t=\t$this->ERPNoEnd ;\n\t\t\t\t\t$myQuery\t=\t\"SELECT IFNULL(( SELECT ERPNo + 1 FROM Article \" .\n\t\t\t\t\t\t\t\t\t\"WHERE ArticleNr LIKE '\".$this->SupplierPrefix.\".%' AND ERPNo >= '$erpNoStart' AND ERPNo <= '$erpNoEnd' \" .\n\t\t\t\t\t\t\t\t\t\"ORDER BY ERPNo DESC LIMIT 1 ), \" . ( $erpNoStart + 1) . \" ) AS newKey\" ;\n\t\t\t\t\t$myRow\t=\tFDb::queryRow( $myQuery) ;\n\t\t\t\t\t$myArticle->ERPNo\t=\tsprintf( \"%08s\", $myRow['newKey']) ;\n\t\t\t\t\t$myArticle->updateColInDb( \"ERPNo\") ;\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\tthrow $e ;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch( Exception $e) {\n\t\t\tthrow $e ;\n\t\t}\n\t\treturn true ;\n\t}", "public function initInappropriates()\n\t{\n\t\t$this->collInappropriates = array();\n\t}", "public function actionInitPool()\r\n {\r\n echo 1;\r\n exit();\r\n ini_set('max_execution_time', 0);\r\n\r\n $prizeType = Config::find()->all();\r\n foreach ($prizeType as $k => $v) {\r\n\r\n if ($v->praisenumber > 0) {\r\n for ($i = 0; $i < $v->praisenumber; $i++) {\r\n $model = new PrizePool();\r\n $model->aid = $v->id;\r\n $model->save();\r\n unset($model);\r\n }\r\n echo $v->praisename;\r\n }\r\n\r\n }\r\n\r\n echo '~All OK!!!';\r\n }", "public function initOperationPrestationss($overrideExisting = true)\n {\n if (null !== $this->collOperationPrestationss && !$overrideExisting) {\n return;\n }\n $this->collOperationPrestationss = new PropelObjectCollection();\n $this->collOperationPrestationss->setModel('OperationPrestations');\n }", "public function initialize()\n {\n // attributes\n $this->setName('evaluacion_pregunta');\n $this->setPhpName('EvaluacionPregunta');\n $this->setIdentifierQuoting(false);\n $this->setClassName('\\\\EvaluacionPregunta');\n $this->setPackage('');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('evpr_codigo', 'EvprCodigo', 'INTEGER', true, null, null);\n $this->addForeignKey('evpr_c_evaluacion', 'EvprCEvaluacion', 'INTEGER', 'evaluacion', 'eval_codigo', true, null, null);\n $this->addForeignKey('evpr_c_pregunta', 'EvprCPregunta', 'INTEGER', 'pregunta', 'preg_codigo', true, null, null);\n $this->addForeignKey('evpr_c_objetivo', 'EvprCObjetivo', 'INTEGER', 'objetivo', 'obje_codigo', true, null, null);\n $this->addForeignKey('evpr_c_seccion', 'EvprCSeccion', 'INTEGER', 'seccion', 'secc_codigo', true, null, null);\n $this->addColumn('evpr_orden', 'EvprOrden', 'INTEGER', false, 1, null);\n $this->addColumn('evpr_r_fecha_creacion', 'EvprRFechaCreacion', 'TIMESTAMP', false, null, null);\n $this->addColumn('evpr_r_fecha_modificacion', 'EvprRFechaModificacion', 'TIMESTAMP', false, null, null);\n $this->addColumn('evpr_r_usuario', 'EvprRUsuario', 'INTEGER', false, null, 1);\n }", "function create_binding() {\r\n\t\ttry {\r\n\t\t\t$conn = db_connect::getInstance();\r\n\t\t\t$result = $conn->db->query(\"SELECT OLT_ID from OLT_IP_POOLS where OLT_ID = '$this->olt_id'\");\r\n\t\t} catch (PDOException $e) {\r\n\t\t\t$error = \"Connection Failed:\" . $e->getMessage() . \"\\n\";\r\n\t\t\treturn $error;\r\n\t\t}\r\n\t\twhile ($row = $result->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\tif ($row[\"OLT_ID\"])\r\n\t\t\t\t$error = (\"ERROR: THIS OLT have been ASSIGNED pool ALREADY, Please remove any existing bindings and try to create again!\");\r\n\t\t\t\treturn $error;\t\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$conn = db_connect::getInstance();\r\n\t\t\t$result = $conn->db->query(\"INSERT INTO OLT_IP_POOLS (OLT_ID, IP_POOL_ID) VALUES ('$this->olt_id', '$this->id')\");\r\n\t\t} catch (PDOException $e) {\r\n\t\t\t$error = \"Connection Failed:\" . $e->getMessage() . \"\\n\";\r\n\t\t\treturn $error;\r\n\t\t}\r\n\t}", "public function getConnection(){\n return BaseOperationPrimesPeer::getConnection();\n }", "public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)\n {\n $pos = OperationPrimesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\n $this->setByPosition($pos, $value);\n }", "public function setPR($r) {}", "public function setRCurrencies(RCurrencies $v = null)\n {\n if ($v === null) {\n $this->setOperationPrimeCurrencyId(NULL);\n } else {\n $this->setOperationPrimeCurrencyId($v->getRCurrencyId());\n }\n\n $this->aRCurrencies = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the RCurrencies object, it will not be re-added.\n if ($v !== null) {\n $v->addOperationPrimes($this);\n }\n\n\n return $this;\n }", "public function addOperationScenarii(OperationScenarii $l)\n {\n if ($this->collOperationScenariis === null) {\n $this->initOperationScenariis();\n $this->collOperationScenariisPartial = true;\n }\n\n if (!in_array($l, $this->collOperationScenariis->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddOperationScenarii($l);\n\n if ($this->operationScenariisScheduledForDeletion and $this->operationScenariisScheduledForDeletion->contains($l)) {\n $this->operationScenariisScheduledForDeletion->remove($this->operationScenariisScheduledForDeletion->search($l));\n }\n }\n\n return $this;\n }" ]
[ "0.64621097", "0.61786366", "0.5385901", "0.529308", "0.4904457", "0.48280057", "0.46794182", "0.46335077", "0.45321354", "0.43928742", "0.43161535", "0.42277503", "0.4221812", "0.42072904", "0.41790408", "0.41401613", "0.411474", "0.41056487", "0.40210992", "0.39886558", "0.39811763", "0.39656046", "0.39571863", "0.39270195", "0.39242202", "0.39157328", "0.39071283", "0.3891716", "0.38831654", "0.38500628" ]
0.7390084
0
Get the value of returnCode
public function getReturnCode() { return $this->returnCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatusCode()\n {\n return (int) $this->getReturnVal();\n }", "public function getErrorCode(){\n return $this->_section->return_error_code;\n }", "public function getCode()\n\t{\n\t\treturn (int)$this->statusCode;\n\t}", "public function getResultCode()\n {\n return $this->_resultCode;\n }", "public function getResultCode()\n {\n return $this->resultCode;\n }", "public function getCode()\n {\n return curl_getinfo($this->handler)['http_code'];\n }", "public function getReturnCode()\n\t\t{\n\t\t\tif ($this->wasExecuted)\n\t\t\t\treturn $this->returnCode;\n\n\t\t\treturn false;\n\t\t}", "public function getCode(): int\n\t{\n\t\treturn $this->err->getCode();\n\t}", "public function getExitCode()\n {\n return $this->exit_code;\n }", "public function getExitCode()\n {\n return $this->exitCode;\n }", "public function getExitCode()\n {\n return $this->exitCode;\n }", "public function getExitCode()\n {\n return $this->exitCode;\n }", "function searchReturnCode()\t{\n\t\treturn $this->getRandomRetourCode();\n\t}", "public function getCode()\n {\n return $this->response_code;\n }", "public function getResponseCode()\r\n {\r\n return $this->getData('response_code');\r\n }", "public function getStatusCode(): int\n {\n return $this->code ;\n }", "public function getExitCode();", "public function getExitCode();", "public function getExitCode() {}", "public function getCode()\n {\n return ! empty($this->result) ? $this->result->getCode() : NULL;\n }", "public function getRet()\n {\n $value = $this->get(self::RET);\n return $value === null ? (integer)$value : $value;\n }", "public function getRet()\n {\n $value = $this->get(self::RET);\n return $value === null ? (integer)$value : $value;\n }", "public function getStatusCode()\r\n\t{\r\n\t\treturn $this->m_code;\r\n\t}", "public function getResultCode() {}", "public function getResponseCode();", "public function getResponseCode();", "public function getExitCode()\n {\n return $this->errorCounter;\n }", "public function getResponseCode()\r\n {\r\n return $this->responseCode;\r\n }", "public function getResponseCode(){\n\t\treturn $this->response->getCode();\n\t}", "protected function recuperoRetCode($returnData) {\n $arrayExp = explode('returnCode>', $returnData);\n $retVal = intval($arrayExp[1]);\n return $retVal;\n }" ]
[ "0.7830994", "0.7816789", "0.78109187", "0.77993613", "0.77729124", "0.7733918", "0.7669106", "0.7607188", "0.75310373", "0.75150716", "0.75150716", "0.75150716", "0.74240613", "0.74011517", "0.73512083", "0.73499054", "0.7331378", "0.7331378", "0.73269075", "0.73109674", "0.7296319", "0.7296319", "0.7275384", "0.7216772", "0.71930987", "0.71930987", "0.7192161", "0.71895164", "0.7186212", "0.71722305" ]
0.86434954
1
Get the value of messgae
public function getMessgae() { return $this->messgae; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMessage(){\n\t\t\treturn $this->message;\n\t\t}", "public function getMessage(){\n\t\treturn $this->message;\n\t}", "private function getMsg()\n {\n return $this->msg;\n }", "public function message()\n {\n return $this->msg;\n }", "public function message()\n {\n return $this->msg;\n }", "public function message()\n {\n return $this->msg;\n }", "public function getMessage() : mixed\n {\n return $this->message;\n \n }", "public function message()\r\n {\r\n return $this->message;\r\n }", "public function message()\r\n {\r\n return $this->message;\r\n }", "public function get_msg() {\r\n return $this->msg;\r\n }", "public function message()\n {\n return $this->mes;\n }", "public function getMessage()\n {\n $rtn = $this->data['message'];\n\n return $rtn;\n }", "abstract public function get_message();", "public function getMessage () {\n\t\treturn $this->message;\n\t}", "function getMessage() {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function message()\n {\n return $this->message;\n }", "public function getMessage() {\n return self::$message;\n }", "public function getMessage() \n\t{\n\t\treturn $this->message;\n\t}" ]
[ "0.7179744", "0.7070213", "0.69565773", "0.689962", "0.689962", "0.689962", "0.6893641", "0.68695295", "0.68695295", "0.6853898", "0.6784508", "0.6763357", "0.67558485", "0.6730124", "0.6729388", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.67285025", "0.672346", "0.6721181" ]
0.76615155
0
Get the value of authCode
public function getAuthCode() { return $this->authCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCode()\n {\n return $this->isSuccessful() ? $this->data[\"AuthCode\"] : parent::getCode();\n }", "public function get_auth_code( $code ) {\n\t\t$tokens = new Token_User( '_indieauth_code_' );\n\t\treturn $tokens->get( $code );\n\t}", "protected function getAuthorizationCode()\n {\n $code = null;\n if ($this->responseMode === 'query' && isset($_GET['code'])) {\n $code = $_GET['code'];\n } else if ($this->responseMode === 'form_post' && isset($_POST['code'])) {\n $code = $_POST['code'];\n }\n\n return $code;\n }", "public function get_authorization_code() {\n\n\t\treturn $this->authorization_num;\n\t}", "public function getCode()\n {\n return $this->values[\"code\"];\n }", "public function getCode()\n {\n $this->code = $_GET['code'];\n return $this->code;\n\n }", "public function getCode() {\n return $this->request->query->get(\"code\") != NULL ? $this->request->query->get(\"code\") : \"\";\n }", "protected function getCode()\n {\n return $this->request->input('code');\n }", "protected function getCode()\n {\n return $this->request->input('code');\n }", "public function getUsercode()\n {\n return $this->usercode;\n }", "public function getUserCode()\n {\n return $this->userCode;\n }", "protected function getAccessCode()\n {\n return $_GET[self::RESPONSE_CODE_PARAM];\n }", "public function getcode()\n {\n return $this->code;\n }", "public function getAccountCode();", "public function getAccountCode();", "public function get_code() {\n\t\treturn $this->code;\n\t}", "public function getCode() {\n return $this->get(self::CODE);\n }", "public function getCode()\n {\n return $this->__get(\"code\");\n }", "public function getCode()\r\n {\r\n return $this->code;\r\n }", "public function getCode()\n {\n return $this->get(self::CODE);\n }", "public function getPreAuthCode()\n {\n $authCode = $this->getPreAuthCodeFromServer();\n Log::debug('Pre auth code:', $authCode);\n return $authCode['pre_auth_code'];\n }", "function getCode()\r\n {\r\n return $this->code;\r\n }", "public function getCode()\n {\n return $this->getValueObject('code');\n }", "public function getCode() {\n return $this->code;\n }", "public function getUserCode(){\n\t\t/* return user code */\n\t\treturn $this->_intUserCode;\n\t}", "public function getCode() {\n return $this->code;\n }", "public function getCode() {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }" ]
[ "0.8285153", "0.78844696", "0.75953406", "0.7413289", "0.7323032", "0.721884", "0.7215816", "0.71820104", "0.71820104", "0.7178934", "0.70966244", "0.7067525", "0.70480776", "0.7043728", "0.7043728", "0.6993433", "0.6930652", "0.6914984", "0.68855304", "0.6883161", "0.6875588", "0.6874112", "0.686469", "0.6863144", "0.6858894", "0.684991", "0.684991", "0.68498254", "0.68498254", "0.68498254" ]
0.86717224
0
Get the value of accountNo
public function getAccountNo() { return $this->accountNo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccountNo()\n {\n return $this->account_no;\n }", "public function getAccountNumber()\n {\n return $this->account_number;\n }", "public function getAccountNumber()\n {\n return $this->account_number;\n }", "public function getAccountNumber()\n {\n return $this->helper->accountNumber();\n }", "public function getAccNo()\n {\n return $this->acc_no;\n }", "public function getAccNumber() \n {\n return $this->acc_number;\n }", "public function getAccNumber()\n {\n return $this->accNumber;\n }", "public function getAccountNumber(): ?string\n {\n return $this->accountNumber;\n }", "public function GetAccountID () \r\n\t{\r\n\t\treturn ($AccountID);\r\n\t}", "public function getAccountID();", "public function getAccountCode();", "public function getAccountCode();", "public function getAccountID()\n {\n return $this->accountID;\n }", "public function getAccountID()\n {\n return $this->accountID;\n }", "public function getAccountId(){\n $value = \\Auth::user()->account_id;\n return $value;\n }", "public function getAccount_id()\n {\n return $this->fv_account_id;\n }", "public function getBankAccountNumber()\n {\n // generate a random number, this will be the account number\n $accountNumber = $this->prependNumber(rand(1, 100000000) . '0');\n\n // because it is a random number, it may be a valid account number\n $remains = $this->checkDigit($accountNumber);\n if ($remains === 0) {\n return $accountNumber;\n }\n\n // number is invalid, increase so it is valid.\n return $this->recalculateToValidOutcome($accountNumber, $remains);\n }", "public function getAccountUid()\n {\n return $this->getProperty('paymentAccountUid');\n }", "public function getAccountNumberType()\n {\n return $this->account_number_type;\n }", "public function getAccountID()\n {\n return $this->getKey('AccountID');\n }", "public function getAccountNumber()\r\n\t{\r\n\t\tif ($this->accountNumber)\r\n\t\t\treturn $this->accountNumber;\r\n\t\t\r\n\t\t$aid = UserFilesGetCatAccount($this->dbh, $this->folderId);\r\n\r\n\t\tif (!$aid)\r\n\t\t{\r\n\t\t\t$asys = new AntSystem();\r\n\t\t\t$ainfo = $asys->getAccountInfoByDb($this->dbh->dbname);\r\n\t\t\t$aid = $ainfo['id'];\r\n\t\t}\r\n\r\n\t\tif ($aid)\r\n\t\t\t$this->accountNumber = $aid;\r\n\t\t\r\n\t\treturn $aid;\r\n\t}", "public function getAccountNumber()\n {\n return $this->hasOne(AccountNumber::className(), ['id' => 'account_number_id']);\n }", "public function resolveaccount()\n {\n //\n $thePaystack = new Paystack();\n return $thePaystack->resolveAccountNumber();\n }", "public function getAccountCode() {\n $code= \\DB::table('account_code')\n \n ->lists('NO');\n return $code;\n }", "public function getNumber(){\n if ( is_null($this->number) ){\n $number = $this->getTable()->getNextBillingNumber($this->getCourier(), 'rest');\n $this->number = \"R-\".date('y',$this->from).date('m',$this->from).\"-\".$this->getCourier()->getCustomerNr().\"-\".$number;\n }\n return $this->number;\n }", "function getCustomerNo() {\n return $this->customerNo;\n }", "public function accountId(): string\n {\n return $this->accountId;\n }", "public function accountId(): string\n {\n return $this->accountId;\n }", "public function getAccountId()\n {\n return $this->account_id;\n }", "public function getAccountId()\n {\n return $this->account_id;\n }" ]
[ "0.86152816", "0.77893347", "0.77893347", "0.75219923", "0.7485823", "0.72222084", "0.7056576", "0.7037025", "0.6862045", "0.67442596", "0.67246765", "0.67246765", "0.66747445", "0.66747445", "0.6643635", "0.6618681", "0.65814227", "0.657316", "0.6361484", "0.6355416", "0.6346677", "0.6316574", "0.62972856", "0.62733287", "0.6273165", "0.626612", "0.6259374", "0.6259374", "0.620921", "0.620921" ]
0.85641295
1
Get the value of ccType
public function getCcType() { return $this->ccType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCcTypeName()\n {\n $types = $this->_paymentConfig->getCcTypes();\n $ccType = $this->getInfo()->getCcType();\n if (isset($types[$ccType])) {\n return $types[$ccType];\n }\n return empty($ccType) ? __('N/A') : $ccType;\n }", "public function getCardCvv()\n\t{\n\t\treturn $this->type;\n\t}", "public function get_ctc_type($type){\n\t\tswitch($type){\n\t\t\tcase 'T':\n\t\t\t$value = 'Thousands';\n\t\t\tbreak;\n\t\t\tcase 'L':\n\t\t\t$value = 'Lacs';\n\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t$value = 'Crore';\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\treturn $value;\n }", "public function getValue() {\n return $this->type;\n }", "function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}", "public function getCardType()\n {\n $additionalData = $this->getAdditionalData();\n \n if (isset($additionalData['card_type'])) {\n return $additionalData['card_type'];\n }\n \n return null;\n }", "public function get_course_type($type){\n\t\tswitch($type){\n\t\t\tcase 'R':\n\t\t\t$value = 'Regular';\n\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t$value = 'Correspondence';\n\t\t\tbreak;\t\t\t\n\t\t}\n\t\treturn $value;\n }", "public function getTypeCom()\n {\n return $this->type_com;\n }", "public function get_type();", "public function get_type(): string;", "public function getType()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'type'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'type'];\n\t\t}\n\t}", "private function get_type() {\n\n\t}", "public function getTypeAsStr() {\n\t\t$cardtypes = array(\n\t\t\t\"race\" => 1,\n\t\t\t\"aspect\" => 2,\n\t\t\t\"power\" => 3,\n\t\t\t\"minion\" => 10,\n\t\t\t\"bane\" => 20\n\t\t);\n\t\tforeach($cardtypes as $typestr => $typeval) {\n\t\t\tif($this->cardType == $typeval) {\n\t\t\t\treturn $typestr;\n\t\t\t}\n\t\t}\n\t}", "public function getType():string { return $this->type; }", "public function getType()\n {\n return parent::getValue('type');\n }", "public function getType()\n {\n $rtn = $this->data['type'];\n\n return $rtn;\n }", "public function getType()\n {\n return $this->_value->getType();\n }", "public function GetType(){\r\r\n\t\treturn $this->type;\r\r\n\t}", "public static function IdentifyCardType($ccNum)\n\t{\n\t\t$ccNum = preg_replace('/[^0-9]+/', '', $ccNum);\n\t\t//Visa 4 13, 16\n\t\tif (preg_match('/^4(.{12}|.{15})$/', $ccNum))\n\t\t\treturn 'VISA';\n\t\t//Master Card 51 to 55 16\n\t\telseif (preg_match('/^5[1-5].{14}$/', $ccNum))\n\t\t\treturn 'MASTERCARD';\n\t\t//American Express 34, 37 15\n\t\telseif (preg_match('/^3[47].{13}$/', $ccNum))\n\t\t\treturn 'AMEX';\n\t\t//Diners Club 300 to 305, 36 14\n\t\t//Carte Blanche 38 14\n\t\telseif (preg_match('/^3(0[0-5].{11}|[68].{12})$/', $ccNum))\n\t\t\treturn 'DINERS';\n\t\t//Discover 6011 16\n\t\telseif (preg_match('/^6011.{12}$/', $ccNum))\n\t\t\treturn 'DISCOVER';\n\t\t//JCB 3 16\n\t\t//JCB 2131, 1800 15\n\t\telseif (preg_match('/^3.{15}|(2131|1800).{11}$/', $ccNum))\n\t\t\treturn 'JCB';\n\t\t//EnRoute 2014, 2149 15\n\t\telseif (preg_match('/^2(014|149).{11}$/', $ccNum))\n\t\t\treturn 'ENROUTE';\n\t\telse\n\t\t\treturn \"N\";\n\t}", "public function getType()\n {\n return self::TYPE;\n }", "public function GetType(){\r\n\t\treturn $this->type;\r\n\t}", "public function getType() : string\n {\n $rtn = $this->data['type'];\n\n return $rtn;\n }", "public function GetType()\n {\n return ( $this->type );\n }", "public function getType()\n {\n\treturn $this->type;\n }", "public function getChannelType(): string;", "private function get_type(){\n\t\treturn $this->_type;\n\t}", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }" ]
[ "0.7198807", "0.6995694", "0.69588137", "0.67550725", "0.65317273", "0.6506843", "0.6504484", "0.65002066", "0.64600253", "0.6416335", "0.63788116", "0.63777524", "0.6349416", "0.6346157", "0.6345668", "0.63322115", "0.6297825", "0.62841064", "0.62839335", "0.62708914", "0.627048", "0.6268067", "0.6253745", "0.62526256", "0.6246087", "0.62272674", "0.6210754", "0.6210247", "0.6209867", "0.6209867" ]
0.7642755
0
Strip header and footer from certificate data.
private function stripCertificateEnvelope($certData) { $certData = str_replace('-----BEGIN CERTIFICATE-----', '', $certData); $certData = str_replace('-----END CERTIFICATE-----', '', $certData); return trim($certData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function strip_armor($data, $marker = 'MESSAGE') {\n // remove the noise from the encrypted data\n $data = str_replace(self::header($marker) . \"\\n\", '' , $data);\n $data = str_replace(self::footer($marker) . \"\\n\", '' , $data);\n $data = trim($data, \"\\n\");\n return $data;\n }", "public function stripHeaders()\n {\n $headers = $this->headers;\n\n // process exact matches\n $ignore_headers = array(\n 'to',\n 'cc',\n 'bcc',\n 'return-path',\n 'received',\n 'Disposition-Notification-To',\n );\n foreach ($ignore_headers as $name) {\n if ($headers->has($name)) {\n $headers->removeHeader($name);\n }\n }\n\n // process patterns\n array_walk(\n $headers->toArray(), function ($value, $name) use ($headers) {\n if (preg_match('/^resent.*/i', $name)) {\n $headers->removeHeader($name);\n }\n }\n );\n }", "function clean_data($string) {\r\n\tif (get_magic_quotes_gpc()) {\r\n\t\t$string = stripslashes($string);\r\n\t}\r\n\t$headers = array(\r\n \t\"/to\\:/i\",\r\n \t\"/from\\:/i\",\r\n \t\"/bcc\\:/i\",\r\n \t\"/cc\\:/i\",\r\n \t\"/Content\\-Transfer\\-Encoding\\:/i\",\r\n \t\"/Content\\-Type\\:/i\",\r\n \t\"/Mime\\-Version\\:/i\" \r\n \t); \r\n \t$string = preg_replace($headers, '', $string);\r\n \r\n\treturn strip_tags($string);\r\n}", "private function getCertResponse($certificate)\n {\n $certificateIgnoredHeader = str_replace('-----BEGIN CERTIFICATE-----', '', $certificate);\n $certificateIgnoredFooter = str_replace('-----END CERTIFICATE-----', '', $certificateIgnoredHeader);\n $certificate = preg_replace(\"/[\\n\\r]/\", \"\", $certificateIgnoredFooter);\n return $certificate;\n }", "public function cleanHeaders()\n {\n /* @codeCoverageIgnoreStart() */\n @header_remove();\n /* @codeCoverageIgnoreEnd */\n }", "function strip_cdata( $html )\n\t{\n\t\tpreg_match_all( '/<!\\[cdata\\[(.*?)\\]\\]>/is', $html, $matches );\n\n\t\treturn str_replace( $matches[ 0 ], $matches[ 1 ], $html );\n\t}", "function strip_cdata($string) {\n preg_match_all('/<!\\[cdata\\[(.*?)\\]\\]>/is', $string, $matches); \n return str_replace($matches[0], $matches[1], $string); \n}", "protected function removeHeaders($input) {\n $part_array = explode(\"\\n\", $input);\n\n // Will strip these headers according to RFC2045.\n $headers_to_strip = [\n 'Content-Type',\n 'Content-Transfer-Encoding',\n 'Content-ID',\n 'Content-Disposition',\n ];\n $pattern = '/^(' . implode('|', $headers_to_strip) . '):/';\n\n while (count($part_array) > 0) {\n\n // Ignore trailing spaces/newlines.\n $line = rtrim($part_array[0]);\n\n // If the line starts with a known header string.\n if (preg_match($pattern, $line)) {\n $line = rtrim(array_shift($part_array));\n // Remove line containing matched header.\n // If line ends in a ';' and the next line starts with four spaces, it's a continuation\n // of the header split onto the next line. Continue removing lines while we have this condition.\n while (substr($line, -1) == ';' && count($part_array) > 0 && substr($part_array[0], 0, 4) == ' ') {\n $line = rtrim(array_shift($part_array));\n }\n }\n else {\n // No match header, must be past headers; stop searching.\n break;\n }\n }\n\n $output = implode(\"\\n\", $part_array);\n return $output;\n }", "public function DKIM_HeaderC($signHeader)\n {\n $signHeader = preg_replace('/\\r\\n\\s+/', ' ', $signHeader);\n $lines = explode(\"\\r\\n\", $signHeader);\n foreach ($lines as $key => $line) {\n list($heading, $value) = explode(':', $line, 2);\n $heading = strtolower($heading);\n $value = preg_replace('/\\s{2,}/', ' ', $value); // Compress useless spaces\n $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value\n }\n $signHeader = implode(\"\\r\\n\", $lines);\n return $signHeader;\n }", "function remove_additional_information_heading() {\n\treturn '';\n}", "public function getHeaderData() {}", "function _cleanup_header_comment($str)\n {\n }", "public function clearHeaders()\n {\n }", "public function desinscription()\n {\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009AF begin\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009AF end\n }", "function strip_crlf ($data)\n{\n $len = strlen ($data);\n for ($i = 0; $i < $len; ++$i)\n {\n $cc = substr ($data, $i, 1);\n $cc1 = substr ($data, $i + 1, 1);\n\n if ((ord ($cc) == 10) || // a new line char\n (ord ($cc) == 13) // a carriage return\n )\n {\n $data = substr ($data, 0, $i);\n break;\n }\n }\n\n return ($data);\n}", "protected function cleanData(&$lines) {\n\n if (empty($lines)) return;\n\n // Currently, we only need to strip a BOM if it exists.\n // Thanks to Derik Badman (http://madinkbeard.com/) for finding the\n // bug and suggesting this fix:\n // http://blog.philipp-michels.de/?p=32\n $first = $lines[0];\n if (substr($first, 0, 3) == pack('CCC', 0xef, 0xbb, 0xbf)) {\n $lines[0] = substr($first, 3);\n }\n }", "public function getAdditionalHeaderData() {}", "public function secureHeader($str)\n {\n return trim(str_replace(array(\"\\r\", \"\\n\"), '', $str));\n }", "function wp_strip_header_tags( $excerpt='' ) {\n\t$raw_excerpt = $excerpt;\n\tif ( '' == $excerpt ) {\n\t\t$excerpt = get_the_content('');\n\t\t$excerpt = strip_shortcodes( $excerpt );\n\t\t$excerpt = apply_filters('the_content', $excerpt);\n\t\t$excerpt = str_replace(']]>', ']]&gt;', $excerpt);\n\t}\n\t$regex = '#(<h([1-6])[^>]*>)\\s?(.*)?\\s?(<\\/h\\2>)#';\n\t$excerpt = preg_replace($regex,'', $excerpt);\n\t$excerpt_length = apply_filters('excerpt_length', 55);\n\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t$excerpt = wp_trim_words( $excerpt, $excerpt_length, $excerpt_more );\n\treturn apply_filters('wp_trim_excerpt', preg_replace($regex,'', $excerpt), $raw_excerpt);\n}", "public function SecureHeader($str) {\n\t $str = str_replace(\"\\r\", '', $str);\n\t $str = str_replace(\"\\n\", '', $str);\n\t return trim($str);\n\t}", "protected function sanitizeHeader($value)\r\n {\r\n //Remove line feeds\r\n $ret = str_replace(\"\\r\", \"\", $value);\r\n $ret = str_replace(\"\\n\", \"\", $ret);\r\n\r\n // Remove injected headers\r\n $find = array(\"/bcc\\:/i\", \r\n \"/Content\\-Type\\:/i\", \r\n \"/Mime\\-Type\\:/i\", \r\n \"/cc\\:/i\", \r\n \"/to\\:/i\");\r\n $ret = preg_replace($find, \r\n \"**bogus header removed**\",\r\n $ret);\r\n\r\n return $ret;\r\n }", "private function _dk_canonicalize_nofws($body, $sHeaders){\n\t\t\n\t\t// HEADERS\n\t\t// a header value which is spread over several lines must be 1-lined\n\t\t$sHeaders = preg_replace(\"/\\r\\n\\s+/\", \" \", $sHeaders);\n\t\t\n\t\t$aHeaders = explode(\"\\r\\n\", $sHeaders);\n\t\t\n\t\tforeach($aHeaders as $key => $line){\n\t\t\t\n\t\t\tif(!empty($line)){\n\t\t\t\n\t\t\t\t$h = explode(':', $line);\n\t\t\t\t$header_type = strtolower(trim($h[0]));\n\t\t\t\t\n\t\t\t\t// keep only signature headers\n\t\t\t\tif(in_array($header_type, $this -> options['signed_headers'])){\n\t\t\t\t\t\n\t\t\t\t\t// delete all WSP in each line\n\t\t\t\t\t$aHeaders[$key] = preg_replace(\"/\\s/\", '', $line);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tunset($aHeaders[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tunset($aHeaders[$key]);\n\t\t\t}\n\t\t}\n\t\t$sHeaders = implode(\"\\r\\n\", $aHeaders);\n\t\t\n\t\t// BODY\n\t\t// delete all WSP in each body line\n\t\t$body_lines = explode(\"\\r\\n\", $body);\n\t\t\n\t\tforeach($body_lines as $key => $line){\n\t\t\t$body_lines[$key] = preg_replace(\"/\\s/\", '', $line);\n\t\t}\n\t\t\n\t\t$body = rtrim(implode(\"\\r\\n\", $body_lines)).\"\\r\\n\";\n\t\t\n\t\treturn $sHeaders.\"\\r\\n\\r\\n\".$body;\n\t}", "public function clearCustomHeaders()\n {\n }", "protected function headerAdditional() {\n return '';\n }", "private function _clean($data){\n $data = preg_replace(\"/\\r|\\n/\",\"\",$data);\n $data = preg_replace(\"/\\s+/\",\" \",$data);\n return $data;\n }", "function additionalHeaderStuff() {\n return;\n }", "function mizzouRemoveXPingbackHeader($aryHeaders){\n if(isset($aryHeaders['X-Pingback'])){\n unset($aryHeaders['X-Pingback']);\n }\n\n return $aryHeaders;\n}", "function cleanStreet($data) { \n // remove things such as '(rear)' at the end of an address\n $street = preg_replace('/\\(.*?\\)$/', '', $data['street']);\n\n //remove 'Access Via' that appears at the begginning of some addresses\n return preg_replace('/^access\\s+via\\s+/i', '', $street);\n}", "public function scrub($data);", "function _extractBER($str)\n {\n /* X.509 certs are assumed to be base64 encoded but sometimes they'll have additional things in them\n * above and beyond the ceritificate.\n * ie. some may have the following preceding the -----BEGIN CERTIFICATE----- line:\n *\n * Bag Attributes\n * localKeyID: 01 00 00 00\n * subject=/O=organization/OU=org unit/CN=common name\n * issuer=/O=organization/CN=common name\n */\n $temp = preg_replace('#.*?^-+[^-]+-+[\\r\\n ]*$#ms', '', $str, 1);\n // remove the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- stuff\n $temp = preg_replace('#-+[^-]+-+#', '', $temp);\n // remove new lines\n $temp = str_replace(array(\"\\r\", \"\\n\", ' '), '', $temp);\n $temp = preg_match('#^[a-zA-Z\\d/+]*={0,2}$#', $temp) ? base64_decode($temp) : false;\n return $temp != false ? $temp : $str;\n }" ]
[ "0.62055284", "0.571185", "0.5545251", "0.5447561", "0.5297353", "0.5191676", "0.51282823", "0.5070846", "0.5027272", "0.4937397", "0.48847398", "0.48798928", "0.48625243", "0.48300108", "0.47870573", "0.4774893", "0.4773257", "0.4770072", "0.4749041", "0.47380862", "0.47238395", "0.4692971", "0.46924192", "0.46835876", "0.46642858", "0.46358785", "0.46117824", "0.45721233", "0.45678502", "0.45596492" ]
0.65779585
0
Convenience method which changes table.column to alias.column. Using this method you can maintain SQL abstraction while using column aliases. $c>addAlias("alias1", TablePeer::TABLE_NAME); $c>addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
public static function alias($alias, $column) { return str_replace(CastleTypePeer::TABLE_NAME.'.', $alias.'.', $column); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prefixColumnsForJoin()\n {\n if (!$columns = $this->query->columns) {\n return $this->select($this->model->getTable().'.*');\n }\n\n foreach ($columns as $key => $column) {\n if ($this->model->hasColumn($column)) {\n $columns[$key] = $this->model->getTable().'.'.$column;\n }\n }\n\n $this->query->columns = $columns;\n }", "public static function alias($alias, $column)\n\t{\n\t\treturn str_replace(CoursePeer::TABLE_NAME.'.', $alias.'.', $column);\n\t}", "public static function alias($alias, $column)\n\t{\n\t\treturn str_replace(TbprofessorPeer::TABLE_NAME.'.', $alias.'.', $column);\n\t}", "public static function alias($alias, $column)\n {\n return str_replace(SertifikasiPdPeer::TABLE_NAME.'.', $alias.'.', $column);\n }", "public static function alias($alias, $column)\n {\n return str_replace(RuangLongitudinalPeer::TABLE_NAME.'.', $alias.'.', $column);\n }", "public static function alias($alias, $column)\n\t{\n\t\treturn str_replace(MissionPhotoPeer::TABLE_NAME.'.', $alias.'.', $column);\n\t}", "public static function alias($alias, $column)\n {\n return str_replace(ReportPeer::TABLE_NAME.'.', $alias.'.', $column);\n }", "public static function alias($alias, $column)\n {\n return str_replace(GsGeneriekeProductenPeer::TABLE_NAME.'.', $alias.'.', $column);\n }", "public static function alias($alias, $column)\n\t{\n\t\treturn str_replace(AsignacionScPeer::TABLE_NAME.'.', $alias.'.', $column);\n\t}", "function TableAlias($tableAlias = null);", "public static function alias($alias, $column)\n {\n return str_replace(GsDailyDefinedDosePeer::TABLE_NAME.'.', $alias.'.', $column);\n }", "public static function addAliasSelectColumns( $alias, Criteria $criteria)\n {\n $criteria->addSelectColumn($alias.'.ID');\n\n $criteria->addSelectColumn($alias.'.REFERENCE');\n\n $criteria->addSelectColumn($alias.'.LOKALREAKTOR');\n\n $criteria->addSelectColumn($alias.'.LIVE');\n\n $criteria->addSelectColumn($alias.'.SUBREAKTOR_ORDER');\n }", "public function alias($field = NULL, $join = NULL)\n\t{\t\n\t\t$meta = $this->meta();\n\t\t\n\t\t// Return the model's alias if nothing is passed\n\t\tif (!$field)\n\t\t{\n\t\t\treturn $meta->table;\n\t\t}\n\t\t\n\t\t// Split off the table name; we already know that\n\t\tif (strpos($field, '.') !== FALSE)\n\t\t{\t\t\t\n\t\t\tlist(, $field) = explode('.', $field);\n\t\t}\n\t\t\n\t\t// Check and concatenate\n\t\tif ($this->field($field))\n\t\t{\n\t\t\t$field = $this->field($field)->column;\n\t\t}\n\t\t\n\t\tif ($join)\n\t\t{\n\t\t\treturn $meta->table.'.'.$field;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $field;\n\t\t}\n\t}", "public static function alias($alias, $column)\n {\n return str_replace(GsSupplementaireProductenHistoriePeer::TABLE_NAME.'.', $alias.'.', $column);\n }", "public function asAlias() {\n\t\treturn ($this->alias ? $this->alias : ($this->table ? $this->table->asAlias() .'__': ''/*null*/).$this->name);\n\t}", "public function joinColumnName($propertyName);", "function alias($alias)\n {\n $this->table_alias = $alias;\n return $this;\n }", "public function testBuildJoinDefaultWithAliases()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->alias('table1_alias')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->alias('table2_alias')\n ->joinOn('id', 'id')\n )\n ;\n\n $this->assertSame(\n 'LEFT JOIN table2 AS table2_alias ON table1_alias.id = table2_alias.id',\n $query->buildJoin()\n );\n }", "public static function alias($alias, $column)\n\t{\n\t\treturn str_replace(RpMissionSummaryPeer::TABLE_NAME.'.', $alias.'.', $column);\n\t}", "abstract public function join($alias_from, $rel_name, $alias_to);", "public function addJoin(Builder $queryBuilder) : void\n {\n $queryBuilder->join(\n $this->_relatedTable . ' AS ' . $this->name,\n $this->_baseTable . '.' . $this->_baseKey,\n '=',\n $this->name . '.' . $this->_foreignKey\n );\n }", "private function addColumn($columnName, $alias = null)\n {\n if (is_string($alias))\n $columnName = \"$columnName AS $alias\";\n\n $this->columns[] = $columnName;\n }", "protected function _qb_alias($field, $join = NULL)\n\t{\n\t\t$model = NULL;\n\t\t\n\t\t// Check for functions\n\t\tif (strpos($field, '\"') !== FALSE)\n\t\t{\n\t\t\t// Quote the column in FUNC(\"ident\") identifiers\n\t\t\treturn preg_replace('/\"(.+?)\"/e', '\"\\\\\"\".$this->_qb_alias(\"$1\").\"\\\\\"\"', $field);\n\t\t}\n\t\t\n\t\t// with() call, aliasing is already completed\n\t\tif (strpos($field, ':') !== FALSE)\n\t\t{\t\t\t\n\t\t\treturn $field;\n\t\t}\n\t\t\n\t\tif (strpos($field, '.') !== FALSE)\n\t\t{\t\t\t\n\t\t\tlist($model, $field) = explode('.', $field);\n\t\t\t\n\t\t\t// If $join is NULL, the column is returned as it came\n\t\t\t// If it was joined when it came in, it returns joined\n\t\t\tif ($join === NULL)\n\t\t\t{\n\t\t\t\t$join = TRUE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($join === NULL)\n\t\t\t{\n\t\t\t\t$join = FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If the model is NULL, $this's table name or model name\n\t\t// We just replace if with the current model's name\n\t\tif ($model === NULL || $model == $this->_table)\n\t\t{\n\t\t\t$model = Jelly_Meta::model_name($this);\n\t\t}\n\t\t\n\t\treturn Jelly_Meta::column($model.'.'.$field, $join);\n\t}", "public function join($table, $alias = NULL, $condition = NULL, $arguments = []);", "public function join(Select $table, $alias, $on)\n {\n return $this->innerJoin($table, $alias, $on);\n }", "public function alias($id, $alias);", "public function testJoinWithAlias()\n {\n $query = (new Select($this->mockConnection))->join('join', 'j.tableId', '=', 'table.id', 'j');\n $array = $query->toArray();\n\n $this->assertInstanceOf(Select::class, $query);\n $this->assertArrayHasKey('join', $array);\n $this->assertCount(1, $array['join']);\n $this->assertEquals([\n 'type' => 'inner',\n 'table' => 'join',\n 'alias' => 'j',\n 'statement' => [\n 'where' => [\n [\n 'column' => 'j.tableId',\n 'operator' => '=',\n 'value' => 'table.id',\n 'boolean' => 'and',\n ]\n ],\n ]\n ], $array['join'][0]);\n $this->assertInstanceOf(Column::class, $array['join'][0]['statement']['where'][0]['value']);\n }", "public function getDbAlias($alias);", "public function joinOn($tableJoin, $columnJoin, $tableOn, $columnOn);", "protected function getJoinTable(): string\n {\n return \"{$this->define(SchemaInterface::TABLE)} AS {$this->getAlias()}\";\n }" ]
[ "0.66060513", "0.6595331", "0.6355234", "0.633762", "0.6310247", "0.630587", "0.6303183", "0.6278325", "0.62193006", "0.6163846", "0.6160412", "0.611915", "0.6078692", "0.6072368", "0.600528", "0.59347546", "0.5932669", "0.5931049", "0.59169686", "0.58962625", "0.5871634", "0.57213193", "0.5706553", "0.5649433", "0.56479794", "0.562527", "0.56170255", "0.55962247", "0.55922306", "0.5569528" ]
0.6651856
0
Applies the 'ref' param to the query being prepared.
private function _applyRefParam() { if (!$this->ref) { return; } $this->subQuery->andWhere(Db::parseParam('globalsets.handle', $this->ref)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDBRef($ref)\n {\n return $this->__call(__FUNCTION__, func_get_args());\n }", "public function setRef($ref);", "public function byReferenceMatch($ref)\n {\n $this->qb->andWhere('(so.id like :ref ' .\n 'or so.customerReference like :ref ' .\n 'or so.sourceID like :ref)')\n ->setParameter('ref', \"%$ref%\");\n return $this;\n }", "public function setRef($ref)\n {\n $this->_ref = $ref;\n }", "public function fetch($id, $ref = '')\n {\n global $conf;\n\n // Check parameters\n if (empty($id) && empty($ref)) return -1;\n\n $sql = \"SELECT c.rowid, c.entity, c.ref, ref_supplier, c.fk_soc, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_vat,\";\n $sql.= \" c.localtax1, c.localtax2, \";\n $sql.= \" c.date_creation, c.date_valid, c.date_approve, c.date_approve2,\";\n $sql.= \" c.fk_user_author, c.fk_user_valid, c.fk_user_approve, c.fk_user_approve2,\";\n $sql.= \" c.date_commande as date_commande, c.date_livraison as date_livraison, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_projet as fk_project, c.remise_percent, c.source, c.fk_input_method,\";\n $sql.= \" c.fk_account,\";\n $sql.= \" c.note_private, c.note_public, c.model_pdf, c.extraparams, c.billed,\";\n $sql.= \" c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc,\";\n $sql.= \" cm.libelle as methode_commande,\";\n $sql.= \" cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,\";\n $sql.= \" p.code as mode_reglement_code, p.libelle as mode_reglement_libelle\";\n $sql.= ', c.fk_incoterms, c.location_incoterms';\n $sql.= ', i.libelle as libelle_incoterms';\n $sql.= \" FROM \".MAIN_DB_PREFIX.\"commande_fournisseur as c\";\n $sql.= \" LEFT JOIN \".MAIN_DB_PREFIX.\"c_payment_term as cr ON c.fk_cond_reglement = cr.rowid\";\n $sql.= \" LEFT JOIN \".MAIN_DB_PREFIX.\"c_paiement as p ON c.fk_mode_reglement = p.id\";\n $sql.= \" LEFT JOIN \".MAIN_DB_PREFIX.\"c_input_method as cm ON cm.rowid = c.fk_input_method\";\n $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';\n $sql.= \" WHERE c.entity = \".$conf->entity;\n if ($ref) $sql.= \" AND c.ref='\".$this->db->escape($ref).\"'\";\n else $sql.= \" AND c.rowid=\".$id;\n\n dol_syslog(get_class($this).\"::fetch\", LOG_DEBUG);\n $resql = $this->db->query($sql);\n if ($resql)\n {\n $obj = $this->db->fetch_object($resql);\n if (! $obj)\n {\n $this->error='Bill with id '.$id.' not found';\n dol_syslog(get_class($this).'::fetch '.$this->error);\n return 0;\n }\n\n $this->id\t\t\t\t\t= $obj->rowid;\n $this->entity\t\t\t\t= $obj->entity;\n\n $this->ref\t\t\t\t\t= $obj->ref;\n $this->ref_supplier\t\t\t= $obj->ref_supplier;\n $this->socid\t\t\t\t= $obj->fk_soc;\n $this->fourn_id\t\t\t\t= $obj->fk_soc;\n $this->statut\t\t\t\t= $obj->fk_statut;\n $this->billed\t\t\t\t= $obj->billed;\n $this->user_author_id\t\t= $obj->fk_user_author;\n $this->user_valid_id\t\t= $obj->fk_user_valid;\n $this->user_approve_id\t\t= $obj->fk_user_approve;\n $this->user_approve_id2\t\t= $obj->fk_user_approve2;\n $this->total_ht\t\t\t\t= $obj->total_ht;\n $this->total_tva\t\t\t= $obj->total_vat;\n $this->total_localtax1\t\t= $obj->localtax1;\n $this->total_localtax2\t\t= $obj->localtax2;\n $this->total_ttc\t\t\t= $obj->total_ttc;\n $this->date\t\t\t\t\t= $this->db->jdate($obj->date_creation);\n $this->date_valid\t\t\t= $this->db->jdate($obj->date_valid);\n $this->date_approve\t\t\t= $this->db->jdate($obj->date_approve);\n $this->date_approve2\t\t= $this->db->jdate($obj->date_approve2);\n $this->date_commande\t\t= $this->db->jdate($obj->date_commande); // date we make the order to supplier\n\t\t\t$this->date_livraison = $this->db->jdate($obj->date_livraison);\n $this->remise_percent\t\t= $obj->remise_percent;\n $this->methode_commande_id\t= $obj->fk_input_method;\n $this->methode_commande\t\t= $obj->methode_commande;\n\n $this->source\t\t\t\t= $obj->source;\n $this->fk_project\t\t\t= $obj->fk_project;\n $this->cond_reglement_id\t= $obj->fk_cond_reglement;\n $this->cond_reglement_code\t= $obj->cond_reglement_code;\n $this->cond_reglement\t\t= $obj->cond_reglement_libelle;\n $this->cond_reglement_doc\t= $obj->cond_reglement_libelle_doc;\n $this->fk_account = $obj->fk_account;\n $this->mode_reglement_id\t= $obj->fk_mode_reglement;\n $this->mode_reglement_code\t= $obj->mode_reglement_code;\n $this->mode_reglement\t\t= $obj->mode_reglement_libelle;\n $this->note\t\t\t\t\t= $obj->note_private; // deprecated\n $this->note_private\t\t\t= $obj->note_private;\n $this->note_public\t\t\t= $obj->note_public;\n $this->modelpdf\t\t\t\t= $obj->model_pdf;\n\n\t\t\t//Incoterms\n\t\t\t$this->fk_incoterms = $obj->fk_incoterms;\n\t\t\t$this->location_incoterms = $obj->location_incoterms;\n\t\t\t$this->libelle_incoterms = $obj->libelle_incoterms;\n\n\t\t\t// Multicurrency\n\t\t\t$this->fk_multicurrency \t\t= $obj->fk_multicurrency;\n\t\t\t$this->multicurrency_code \t\t= $obj->multicurrency_code;\n\t\t\t$this->multicurrency_tx \t\t= $obj->multicurrency_tx;\n\t\t\t$this->multicurrency_total_ht \t= $obj->multicurrency_total_ht;\n\t\t\t$this->multicurrency_total_tva \t= $obj->multicurrency_total_tva;\n\t\t\t$this->multicurrency_total_ttc \t= $obj->multicurrency_total_ttc;\n\n $this->extraparams\t\t\t= (array) json_decode($obj->extraparams, true);\n\n $this->db->free($resql);\n\n // Retreive all extrafield\n // fetch optionals attributes and labels\n $this->fetch_optionals();\n\n if ($this->statut == 0) $this->brouillon = 1;\n\n /*\n * Lines\n */\n $result=$this->fetch_lines();\n if ($result < 0)\n {\n \treturn -1;\n }\n else\n {\n \treturn 1;\n }\n }\n else\n {\n $this->error=$this->db->error().\" sql=\".$sql;\n return -1;\n }\n }", "private function bindParam()\n\t{\n\t\tif($this->nbParameters == 0)\n\t\t\treturn;\n\t\t$stmt = $this->stmt;\n\t\tcall_user_func_array(array($stmt, \"bind_param\"), $this->refValues(array_merge(array($this->parametersTypes), $this->parametersValues)));\n\t}", "public function queryReferencesByReference($ref_id){\n $result=$this->query(\"SELECT page_id FROM Reference WHERE ref_id='$ref_id'\");\n }", "function getProdutoCol($col, $ref, $rel)\n{\n global $conn;\n /*\n *query da disciplina\n */\n $sql = \"SELECT pro_{$col} FROM \".TABLE_PREFIX.\"_produto WHERE pro_{$ref}=?\";\n if(!$qry = $conn->prepare($sql))\n echo divAlert($conn->error, 'error');\n\n else {\n\n if (!apenasNumeros($rel))\n $qry->bind_param('s', $rel);\n else\n $qry->bind_param('i', $rel);\n\n $qry->execute();\n $qry->bind_result($$col);\n $qry->fetch();\n $qry->close();\n\n return $$col;\n }\n\n}", "function query() {\n $this->field_alias = $this->real_field;\n }", "function query() {\n $this->field_alias = $this->real_field;\n }", "public function fillPrepared( $preparedQuery, $args ) {\n\t\treset( $args );\n\t\t$this->preparedArgs =& $args;\n\n\t\treturn preg_replace_callback( '/(\\\\\\\\[?!&]|[?!&])/',\n\t\t\tarray( &$this, 'fillPreparedArg' ), $preparedQuery );\n\t}", "protected function prepareQuery($query) {}", "private function _prepareQuery() \n\t{\n\t\t\t// Establish connection to the database if not already connected\n\t\tif (! $this->_connection || empty($this->_connection)) {\n\t\t\t\n\t\t\t // retrieve the database configuration from the registry\n\t\t\t$config = Registry::getSetting('dbConfig');\n\t\t\t\n\t\t\t$this->_newConnection(\n\t\t\t\t\t$config['host'], \n\t\t\t\t\t$config['database'], \n\t\t\t\t\t$config['user'], \n\t\t\t\t\t$config['password']);\n\t\t}\n\t\t\n\t\tif (! $stmt = $this->_connection->prepare ( $this->_query )) {\n\t\t\ttrigger_error ( 'Problem preparing query', E_USER_ERROR );\n\t\t}\n\t\t$this->_stmt = $stmt;\n\t}", "public function filterByRef($ref = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($ref)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $ref)) {\n\t\t\t\t$ref = str_replace('*', '%', $ref);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(LpPeer::REF, $ref, $comparison);\n\t}", "public function &prepare_self($q)\n {\n $st = &$this->prepare($q);\n $st->setFetchMode(PDO::FETCH_INTO, $this->type);\n //$st->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n return $st;\n }", "public function query() {\n $this->field_alias = $this->real_field;\n }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function query($rawQuery, $param = array()){\n \n $stmt = $this->conn->prepare($rawQuery);\n \n $this->setParams($stmt, $param);\n \n $stmt->execute();\n \n return $stmt;\n \n}", "public function edit_produit_reference($reference,$id_produit)\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t$stmt = $this->conn->prepare(\"UPDATE produit SET Reference = :reference WHERE IDProduit = :id\");\n\t\t\t\t$stmt->bindparam(\":reference\", $reference);\n\t\t\t\t$stmt->bindparam(\":id\", $id_produit);\n\t\t\t\t$stmt->execute();\n\t\t\treturn $stmt;\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\techo $e->getMessage();\n\t\t}\n\t}", "private function PrepStatement()\n\t{\n\t\t$this->stmt = $this->prepare($this->query->statement);\n\t\tif($this->query->parameters !==NULL && $this->query->paramtype !==NULL\n\t\t\t&& count($this->query->parameters) == count($this->query->paramtype))\n\t\t{\n\t\t\tforeach ($this->query->parameters as $parameter => $value)\n\t\t\t{\n\t\t\t\t$this->stmt->bindValue($parameter, $value, $this->query->paramtype[$parameter]);\n\t\t\t}\n\t\t}\n\t\telseif ($this->query->parameters!==NULL)\n\t\t{\n\t\t\tforeach ($this->query->parameters as $parameter => $value)\n\t\t\t{\n\t\t\t\t$this->stmt->bindValue($parameter, $value, pdo::PARAM_STR);\n\t\t\t}\n\t\t}\n\t}", "function setRef($name, &$value) {\n $this->vars[$name] =& $value; //is_object($value) ? $value->fetch() : $value;\n }", "function stmt_bind_assoc (&$stmt, &$out) {\n //$resultrow = array();\n //stmt_bind_assoc($stmt, $resultrow);\n\n $data = mysqli_stmt_result_metadata($stmt);\n $fields = array();\n $out = array();\n\n $fields[0] = $stmt;\n $count = 1;\n\n while($field = mysqli_fetch_field($data)) {\n $fields[$count] = &$out[$field->name];\n $count++;\n }\n call_user_func_array(mysqli_stmt_bind_result, $fields);\n}", "protected function set_callable_reference( $callable_reference, $is_prepared = false ) {\n\t\t$this->callable_reference = $callable_reference;\n\t\t$this->is_callable_reference_prepared = $is_prepared;\n\t}", "function query($query, $use_prepare=false)\n {\n if ($use_prepare)\n $param = &$this->getParamaters();\n \n\t\t\t// check for ezQuery placeholder tag and replace tags with proper prepare tag\n\t\t\t$query = str_replace(_TAG, '?', $query);\n \n\t\t\t// For reg expressions\n\t\t\t$query = str_replace(\"/[\\n\\r]/\",'',trim($query)); \n\n\t\t\t// initialize return\n\t\t\t$return_val = 0;\n\n\t\t\t// Flush cached values..\n\t\t\t$this->flush();\n\n\t\t\t// Log how the function was called\n\t\t\t$this->log_query(\"\\$db->query(\\\"$query\\\")\");\n\n\t\t\t// Keep track of the last query for debug..\n\t\t\t$this->last_query = $query;\n\n\t\t\t// Perform the query via std SQLite3 query or SQLite3 prepare function..\n if (!empty($param) && is_array($param) && ($this->getPrepare())) {\n $this->result = $this->query_prepared($query, $param);\t\n\t\t\t\t$this->setParamaters();\n } else \n $this->result = $this->dbh->query($query);\n\t\t\t$this->count(true, true);\n\n\t\t\t// If there is an error then take note of it..\n\t\t\tif (@$this->dbh->lastErrorCode())\n\t\t\t{\n\t\t\t\t$err_str = $this->dbh->lastErrorMsg();\n\t\t\t\t$this->register_error($err_str);\n\t\t\t\t$this->show_errors ? trigger_error($err_str,E_USER_WARNING) : null;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Query was an insert, delete, update, replace\n\t\t\tif ( preg_match(\"/^(insert|delete|update|replace)\\s+/i\",$query) )\n\t\t\t{\n\t\t\t\t$this->rows_affected = @$this->dbh->changes();\n\t\t\t\t\n\t\t\t\t// Take note of the insert_id\n\t\t\t\tif ( preg_match(\"/^(insert|replace)\\s+/i\",$query) )\n\t\t\t\t{\n\t\t\t\t\t$this->insert_id = @$this->dbh->lastInsertRowID();\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Return number of rows affected\n\t\t\t\t$return_val = $this->rows_affected;\n\t\n\t\t\t}\n\t\t\t// Query was an select\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\t// Take note of column info\t\n\t\t\t\t$i=0;\n\t\t\t\t$this->col_info = array();\n\t\t\t\twhile ($i < @$this->result->numColumns())\n\t\t\t\t{\n\t\t\t\t\t$this->col_info[$i] = new StdClass;\n\t\t\t\t\t$this->col_info[$i]->name = $this->result->columnName($i);\n\t\t\t\t\t$this->col_info[$i]->type = null;\n\t\t\t\t\t$this->col_info[$i]->max_length = null;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Store Query Results\n\t\t\t\t$num_rows=0;\n\t\t\t\twhile ($row = @$this->result->fetchArray(SQLITE3_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t// Store result as an objects within main array\n\t\t\t\t\t$obj= (object) $row; //convert to object\n\t\t\t\t\t$this->last_result[$num_rows] = $obj;\n\t\t\t\t\t$num_rows++;\n\t\t\t\t}\n \n\n\t\t\t\t// Log number of rows the query returned\n\t\t\t\t$this->num_rows = $num_rows;\n\t\t\t\t\n\t\t\t\t// Return number of rows selected\n\t\t\t\t$return_val = $this->num_rows;\n\t\t\t\n\t\t\t}\n \n //if (($param) && is_array($param) && ($this->getPrepare()))\n // $this->result->finalize(); \n\n\t\t\t// If debug ALL queries\n\t\t\t$this->trace||$this->debug_all ? $this->debug() : null ;\n\n\t\t\treturn $return_val;\n\t\t\n\t\t}", "public function query($query){\r\n $args = func_get_args();\r\n array_shift($args); //first element is not an argument but the query itself, should removed\r\n\r\n $reponse = parent::prepare($query);\r\n $reponse->execute($args);\r\n return $reponse;\r\n\r\n }", "public function check_for_references ( $referenced_table_name , $_params = array() )\n\t{\n\t\t//----------------------------------\n\t\t// Fetching reference information\n\t\t//----------------------------------\n\n\t\t$this->cur_query = array(\n\t\t\t\t'do' => \"select\",\n\t\t\t\t'fields' => array( \"table_name\" , \"column_name\" , \"referenced_column_name\"),\n\t\t\t\t'table' => array( \"information_schema.KEY_COLUMN_USAGE\" ),\n\t\t\t\t'where' => array(\n\t\t\t\t\t\tarray( 'table_schema = ' . $this->quote( $this->Registry->config['sql']['dbname'] ) ),\n\t\t\t\t\t\tarray( 'referenced_table_name = ' . $this->quote( $referenced_table_name ) ),\n\t\t\t\t\t)\n\t\t\t);\n\t\t$reference_information = $this->simple_exec_query();\n\n\t\t//----------------------------------------\n\t\t// Fetching referenced data statistics\n\t\t//----------------------------------------\n\n\t\tif ( !empty( $_params ) and $_params['_do_count'] === true and !empty( $_params['referenced_column_name'] ) and !empty( $_params['value_to_check'] ) )\n\t\t{\n\t\t\t$_data_statistics = array();\n\t\t\tforeach ( $reference_information as $_r )\n\t\t\t{\n\t\t\t\tif ( $_r['referenced_column_name'] != $_params['referenced_column_name'] )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->cur_query = array(\n\t\t\t\t\t\t'do' => \"select_one\",\n\t\t\t\t\t\t'fields' => array( new Zend_Db_Expr( \"count(*)\" ) ),\n\t\t\t\t\t\t'table' => $_r['table_name'],\n\t\t\t\t\t\t'where' => $_r['table_name'] . \".\" . $_r['column_name'] . \"=\" .\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tis_int( $_params['value_to_check'] )\n\t\t\t\t\t\t\t\t?\n\t\t\t\t\t\t\t\t$this->quote( $_params['value_to_check'], \"INTEGER\" )\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t$this->quote( $_params['value_to_check'] )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t$_data_statistics[ $_r['table_name'] ] = $this->simple_exec_query();\n\t\t\t}\n\t\t}\n\n\t\t//----------\n\t\t// Return\n\t\t//----------\n\n\t\treturn array( 'reference_information' => $reference_information, '_data_statistics' => $_data_statistics );\n\t}", "public function get($sql)\n{\n $stmt = $this->link->prepare($sql);\n $stmt->execute();\n return $stmt;\n\n}" ]
[ "0.57047206", "0.5651822", "0.5453584", "0.5220829", "0.51574314", "0.5092207", "0.50805503", "0.5037387", "0.5024351", "0.5024351", "0.4988168", "0.4947402", "0.49436864", "0.49435544", "0.49257338", "0.49152496", "0.4907309", "0.4907309", "0.4907309", "0.4907309", "0.48843902", "0.48528463", "0.48451728", "0.4813392", "0.4812962", "0.4802632", "0.4799927", "0.47936895", "0.47891054", "0.47867513" ]
0.77686644
0
Applies the 'editable' param to the query being prepared.
private function _applyEditableParam() { if ($this->editable) { // Limit the query to only the global sets the user has permission to edit $editableSetIds = Craft::$app->getGlobals()->getEditableSetIds(); $this->subQuery->andWhere(['elements.id' => $editableSetIds]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEditable(bool $editable=true): self;", "public function setEditableInColumn(bool $editableInColumn=true): self;", "public function editable($editable)\n {\n $this->editable = $editable;\n\n return $this;\n }", "function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}", "public function setEditable($editable = true, $setDefaultValue = true) {}", "public function is_editable() {\n\t\treturn false;\n\t}", "function BeforeQueryEdit(&$strSQL, &$strWhereClause, &$pageObject)\n{\n\n\t\t$strSQL = calendar_getDbValuesById($_REQUEST[\"editid1\"], $pageObject->connection);\n;\t\t\n}", "public function setEditable($value);", "function edit($tablename, $edit_field, $edit_value, $find_field = \"\", $find_value = \"\") {\r\n if (($find_field == \"\") && ($find_value == \"\")) {\r\n $query = \"update $tablename set $edit_field = '$edit_value';\";\r\n return $this->makeQuery($query);\r\n } else if (($find_field != \"\") && ($find_value != \"\")) {\r\n $query = \"update $tablename set $edit_field = '$edit_value' where $find_field = '$find_value';\";\r\n //echo $query;\r\n return $this->makeQuery($query);\r\n }\r\n }", "public function isEditable() {}", "public function editSaveQuery() {\n\t\t$this->expiredStatusToQuery('expired', 'expiration');\n\t}", "public function isEditable();", "public function isEditable();", "public function isEditable()\n {\n return $this->_editable;\n }", "public function isEditable()\n\t{\n\t\tif (($this->getName() === 'publicid') || ($this->getName() === 'posturl')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function PMA_urlParamsInEditMode($url_params)\n{\n if (isset($_REQUEST['where_clause'])) {\n $url_params['where_clause'] = trim($_REQUEST['where_clause']);\n }\n if (! empty($_REQUEST['sql_query'])) {\n $url_params['sql_query'] = $_REQUEST['sql_query'];\n }\n return $url_params;\n}", "public static function setEditable($bool) {\n\t\tself::$editable = $bool;\n\t}", "public function editable()\n {\n if ($this->getMode() == \"only_external\") {\n return false;\n }\n if ($this->hasScript()) {\n // can't edit calculated fields\n return false;\n }\n if (!isset($this->data[\"editable\"])) {\n return true;\n }\n return (true == $this->data[\"editable\"]);\n }", "function BeforeQueryView(&$strSQL, &$strWhereClause, &$pageObject)\n{\n\n\t\t$strSQL = calendar_getDbValuesById($_REQUEST[\"editid1\"], $pageObject->connection);\n;\t\t\n}", "public function isEditable($id)\n\t{\n\t\t// TODO: Implement isEditable() method.\n\t}", "public function edit(){\n try{\n $stmt = $this->conn->prepare(\"UPDATE tbltodo SET completed=:completed,\n title =:title WHERE id=:id \");\n $stmt->bindparam(\":id\",$this->id);\n $stmt->bindparam(\":title\",$this->title);\n $stmt->bindparam(\":completed\",$this->completed);\n $stmt->execute();\n return true;\n }catch(PDOException $e){\n echo $e->getMessage();\n return false;\n }\n }", "function IsRecordEditable($values, $isEditable)\n{\n\n\t\t\n\n$lkd=$values[\"Locked\"];\n\nif($lkd==1) {\n\nreturn $isEditable=false;\n\n}\n\nelse return $isEditable=true;\n;\t\t\n}", "private function internalUpdate()\n {\n $param = array();\n\n // Run before update methods and stop here if the return bool false\n if ($this->runBefore('update') === false)\n return false;\n\n // Define fieldlist array\n $fieldlist = array();\n\n // Build updatefields\n foreach ( $this->data as $fld => $val )\n {\n // Skip datafields not in definition\n if (!$this->isField($fld))\n continue;\n\n $val = $this->checkFieldvalue($fld, $val);\n $type = $val == 'NULL' ? 'raw' : $this->getFieldtype($fld);\n\n $fieldlist[] = $this->alias . '.' . $fld . '={' . $type . ':' . $fld . '}';\n $param[$fld] = $val;\n }\n\n // Create filter\n $filter = ' WHERE ' . $this->alias . '.' . $this->pk . '={' . $this->getFieldtype($this->pk) . ':' . $this->pk . '}';\n\n // Even if the pk value is present in data, we set this param manually to prevent errors\n $param[$this->pk] = $this->data->{$this->pk};\n\n // Build fieldlist\n $fieldlist = implode(', ', $fieldlist);\n\n // Create complete sql string\n $sql = \"UPDATE {db_prefix}{$this->tbl} AS {$this->alias} SET {$fieldlist}{$filter}\";\n\n // Run query\n $this->db->query($sql, $param);\n\n // Run after update event methods\n if ($this->runAfter('update') === false)\n return false;\n }", "public function editable($value) {\n return $this->setProperty('editable', $value);\n }", "function userIsAdminUpdate(PDO $db, bool $isAdmin, $id)\n{\n $sql = \"UPDATE users SET isAdmin = :isAdmin WHERE id = :id\";\n\n $stmt = $db->prepare($sql); \n \n $stmt->bindParam(':isAdmin', $isAdmin, PDO::PARAM_STR);\n $stmt->bindParam(':id', $id, PDO::PARAM_INT);\n $stmt->execute();\n}", "function PMA_getValuesForEditMode($paramArray)\n{\n $found_unique_key = false;\n list($table, $db) = $paramArray;\n if (isset($_REQUEST['where_clause'])) {\n $where_clause_array = PMA_getWhereClauseArray();\n list($whereClauses, $resultArray, $rowsArray, $found_unique_key)\n = PMA_analyzeWhereClauses($where_clause_array, $paramArray, $found_unique_key);\n return array(false, $whereClauses, $resultArray, $rowsArray, $where_clause_array, $found_unique_key);\n } else {\n list($results, $row) = PMA_loadFirstRowInEditMode($paramArray);\n return array(true, null, $results, $row, null, $found_unique_key);\n }\n}", "public function edit($sql){\n\t\t$this->db->query($sql) or die ($this->db->error);\n\t}", "function edit_data($where,$table){\n return $this->db->get_where($table,$where);\n }", "public function set_edit($param)\n\t{\n\t\t$this->edit = (bool)$param;\n\t\treturn $this;\n\t}", "function edit_data($where,$table){ \n return $this->db->get_where($table,$where);\n }" ]
[ "0.64965355", "0.61671996", "0.61587083", "0.6102476", "0.6025041", "0.5967622", "0.58838236", "0.57766664", "0.5710694", "0.5706289", "0.5664719", "0.5577722", "0.5577722", "0.55641896", "0.55317223", "0.5508274", "0.54628587", "0.52885413", "0.52797174", "0.5232665", "0.52182865", "0.5211997", "0.520645", "0.5199485", "0.51865566", "0.5136378", "0.51193947", "0.51039827", "0.5074701", "0.5072821" ]
0.782693
1
The XFlickr Constructor. This method is used to create a new XFlickr object.
function __construct(modX &$modx,array $config = array()) { $this->modx =& $modx; $core = $this->modx->getOption('core_path').'components/xflickr/'; $assets_url = $this->modx->getOption('assets_url').'components/xflickr/'; $assets_path = $this->modx->getOption('assets_path').'components/xflickr/'; $this->api_key = $this->modx->getOption('xflickr.api_key'); $this->api_secret = $this->modx->getOption('xflickr.api_secret'); $this->token = $this->modx->getOption('xflickr.token'); $this->config = array_merge(array( 'core_path' => $core, 'model_path' => $core.'model/', 'processors_path' => $core.'processors/', 'controllers_path' => $core.'controllers/', 'chunks_path' => $core.'chunks/', 'base_url' => $assets_url, 'css_url' => $assets_url.'css/', 'js_url' => $assets_url.'js/', 'connector_url' => $assets_url.'connector.php', ),$config); $this->modx->addPackage('xflickr',$this->config['model_path']); if ($this->modx->lexicon) { $this->modx->lexicon->load('xflickr:default'); } /* load debugging settings */ if ($this->modx->getOption('debug',$this->config,false)) { error_reporting(E_ALL); ini_set('display_errors',true); $this->modx->setLogTarget('HTML'); $this->modx->setLogLevel(MODX_LOG_LEVEL_ERROR); $debugUser = $this->config['debugUser'] == '' ? $this->modx->user->get('username') : 'anonymous'; $user = $this->modx->getObject('modUser',array('username' => $debugUser)); if ($user == null) { $this->modx->user->set('id',$this->modx->getOption('debugUserId',$this->config,1)); $this->modx->user->set('username',$debugUser); } else { $this->modx->user = $user; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n parent::__construct();\n $this->flickrApi = new PhpFlickr(env('FLICKR_KEY'));\n }", "function __construct() {\n parent::__construct();\n $params = array('api_key' => FLICKR_API_KEY, 'secret' => FLICKR_API_SECRET, 'die_on_error' => FALSE);\n $this->load->library('phpflickr', $params);\n $CI = & get_instance();\n $path = $CI->config->item('cache_path');\n $cache_path = ($path == '') ? APPPATH . 'cache/' : $path;\n $this->phpflickr->enableCache('fs', $cache_path, 7200);\n }", "public function __construct()\n\t\t{\n\n\t\t\tparent::__construct( 'themeists-flickr-widget', 'Themeists Flickr Widget', array(\n\t\t\t\t'description' => 'Display up to 20 of your latest Flickr submissions in your sidebar.',\n\t\t\t) );\n\n\t\t}", "public function init(){\n if( !isset($this->access_token) && !StileroFlickrFrob::hasFrobInGetRequest() ){\n $Url = new StileroFlickrUrl($this->Api);\n $Url->redirectToUrl($this->perms);\n }else if( StileroFlickrFrob::hasFrobInGetRequest() ){\n $this->Frob->fetchFrob();\n $Authtoken = new StileroFlickrAuthtoken($this->Api, $this->Frob);\n $Authtoken->requestToken();\n $this->access_token = $Authtoken->token;\n }if(isset($this->access_token)){\n $this->_endpoints();\n }\n return $this;\n }", "function __construct() {\n\n // Declare objects\n $this->photo = new suxPhoto(); // Photos\n $this->r = new photosRenderer($this->module); // Renderer\n parent::__construct(); // Let the parent do the rest\n\n // Declare properties\n $this->r->bool['analytics'] = true; // Turn on analytics\n $this->per_page = $this->tpl->getConfigVars('perPage');\n\n }", "public function __construct(FlickrCrawler $fc)\n {\n $this->fc = $fc;\n parent::__construct();\n }", "public function __construct() {\n XRef::setConfigFileName(\"default\");\n XRef::setConfigValue(\"xref.data-dir\", \"tmp\");\n $this->xref = new XRef();\n }", "public function __construct()\n {\n include(ANAX_INSTALL_PATH . '/config/vars.php');\n $this->apikey = $apiKeyIp;\n $this->baseUrl = \"http://api.ipstack.com/\";\n $this->baseUrlMap = \"https://www.openstreetmap.org/\";\n $this->curl = new Curl();\n }", "public function test__construct()\n {\n $urlResult = new \\MphpFlickrPhotosGetInfo\\Result\\UrlResult($this->getAdapter());\n }", "function __construct() {\n\t\t$this->_foursquare = new FoursquareAPI(self::$client_key, self::$client_secret);\n\t}", "public function __construct() {\n parent::__construct();\n\n $this -> radiusX;\n $this -> radiusY;\n\n\t}", "function __construct()\n {\n // vars\n $this->name = 'sirna_hotspot';\n $this->label = 'Sirna Hotspot';\n $this->category = 'Sirna'; // Basic, Content, Choice, etc\n $this->defaults = array(\n 'save_format' => 'object',\n 'preview_size' => 'full',\n 'library' => 'all'\n );\n \n // do not delete!\n parent::__construct();\n \n // settings\n $this->settings = array(\n 'path' => apply_filters('acf/helpers/get_path', __FILE__),\n 'dir' => apply_filters('acf/helpers/get_dir', __FILE__),\n 'version' => '0.0.1'\n );\n\n // filters\n add_filter('get_media_item_args', array($this, 'get_media_item_args'));\n add_filter('wp_prepare_attachment_for_js', array($this, 'wp_prepare_attachment_for_js'), 10, 3);\n\n // JSON\n add_action('wp_ajax_acf/fields/image/get_images', array($this, 'ajax_get_images'), 10, 1);\n add_action('wp_ajax_nopriv_acf/fields/image/get_images', array($this, 'ajax_get_images'), 10, 1);\n\n // Hotspot\n add_action('wp_ajax_test_response', array($this, 'ajax_test_request'), 10, 5);\n }", "function __construct() {\n\t\t// vars\n\t\t$this->name = 'autosuggest_box';\n\t\t$this->label = __('Autosuggest Box');\n\t\t$this->category = __(\"jQuery\", $this->domain); // Basic, Content, Choice, etc\n\t\t$this->domain = 'acf-field-autosuggest-box';\n\t\t$this->defaults = array();\n\n\n\n\t\t// do not delete!\n \tparent::__construct();\n\n\n \t// settings\n\t\t$this->settings = array(\n\t\t\t'path' => apply_filters('acf/helpers/get_path', __FILE__),\n\t\t\t'dir' => apply_filters('acf/helpers/get_dir', __FILE__),\n\t\t\t'version' => '2.0.9'\n\t\t);\n\n\t}", "public function __construct(FlickrApi $api, $photo) {\n\t\t$this->api = $api;\n\t\t$this->photo = $photo;\n\t}", "public function flickrImageSearch() {\n return $this;\n }", "public function __construct()\n {\n $this->apiKey = Config::i()->getSXApiKey();\n }", "function __construct()\n {\n parent::__construct();\n\n // Set our page category and name\n $this->pageCategory('default');\n $this->pageName('The object you called did not properly extend the fRESTApplication Object');\n\n // We're going to output XML\n $this->fOutput->setMimeType('text/xml');\n\n // No caching output\n //$this->fOutput->noCache = true;\n\n // Don't use the theme or try and merge them\n $this->fTheme->useTheme(false);\n\n // Setup our default DOM document\n $this->dom = new DOMDocument('1.0', 'UTF-8');\n $this->dom->formatOutput = true;\n\n // Create the root node and result subnode\n $this->parentNode = $this->dom->createElement(get_class($this));\n $this->dom->appendChild($this->parentNode);\n $this->result = $this->dom->createElement('result');\n $this->parentNode->appendChild($this->result);\n\n // Append the hostname for debugging\n $hostname = new tHostname();\n $this->parentNode->appendChild($this->dom->createElement('host', $hostname->get()));\n\n // Append the request time\n $this->parentNode->appendChild($this->dom->createElement('requestTime', strftime('%x %X')));\n }", "protected function _construct()\n {\n $this->_init('magebees_finder', 'finder_id');\n }", "public function __construct()\n {\n $this->setActive( TRUE );\n $this->setAllowGif( FALSE );\n $this->setAllowPng( FALSE );\n $this->setApplyWatermark( TRUE );\n $this->setCreatedAt( new \\DateTime() );\n $this->setFilename( NULL );\n $this->setGif( FALSE );\n $this->setPng( FALSE );\n $this->setPosition( 0 );\n $this->setRating( 3 );\n $this->setRatingsCount( 1 );\n $this->setTitle( NULL );\n $this->setType( 'pin' );\n $this->setViews( 0 );\n }", "public function __construct( ){\n parent::__construct();\n // Get and set search options.\n $this->searchOptions = new stdClass();\n $this->searchOptions->searchDescription = \"false\"; // Should we search in the description? [true,false]\n $this->searchOptions->entriesPerPage = 10; // [Min: 1. Max: 100. Default: 100.]\n $this->searchOptions->pageToGet = 1; // [Min: 1. Max: 100. Default: 1.]\n $this->searchOptions->filters = array(); // Filter our search - Array(array('name' => 'filtername','value' => 'filtervalue','paramName' => 'name','paramValue' => 'value'));\n $this->searchOptions->aspects = array(); // Aspect filter - Array(\"aspectName1\" => array(\"value1\", \"value2\", \"value3\"...),\"aspectName2\" => array(\"value1\", \"value2\", \"value3\"...)...)\n $this->searchOptions->categories = array(); // Categories for the search - Array(\"categoryID1\", \"categoryID2\", \"categoryID3\"...)\n $this->searchOptions->sortOrder = \"BestMatch\"; // Search results sorting order. [BestMatch, PricePlusShippingHighest, PricePlusShippingLowest]\n $this->searchOptions->searchQuery = \"\"; // Our search query.\n\n // Default comms header.\n $this->headers = array();\n $this->_setDefaultHeaders();\n }", "public function __construct() {\n $this->content = new Search();\n $this->contentdb = new Content();\n $this->managerStat = new ManagerStat('dsn_stat');\n $this->redisClient = new RedisClient(Configuration::get('redis_db_search'));\n $this->redisClientF = new RedisClient(Configuration::get('redis_db_user'));\n $this->filter = new Filter();\n $this->analyser = new AnalyseRequest();\n $this->urlService = Configuration::get('middleware_json_rpc', null);\n }", "public function __construct() {\n if (!$this->api) {\n $this->api = new Wrapper();\n }\n }", "public function __construct() {\n\t $this->metadata = new \\OpenCloud\\Metadata();\n\t}", "public function __construct()\n\t{\n\t\t$this->instance =& get_instance();\n\n\t\t$this->options = array();\n\n\t\t$this->ch = curl_init();\n\n\t\t$this->header_info = array();\n\n $this->result = \"\";\n\t}", "public function __construct()\n\t\t{\n\t\t\t$this->_username = \"lenykoskey\";\n\t\t\t$this->_apiKey = \"abbfa09e621a6ece272a254e3fcd910657ff46e88f82db205499603d06dda908\";\n\n\t\t}", "function __construct() {\n\t\t$this->m_serverURLs = array();\n\t\t$this->m_proxyHost = null;\n\t\t$this->m_proxyPassword = null;\n\t\t$this->m_proxyPort = 80;\n\t\t$this->m_proxyUserName = null;\n\t\t$this->m_request = new CardEaseXML_Request();\n\t\t$this->m_response = null;\n\t\t$this->m_xmlEncoding = XMLEncoding_UTF_8;\n\t}", "public function __construct()\n {\n parent::__construct();\n\n $siteConfig = SiteConfig::current_site_config();\n $clientID = $siteConfig->VimeoFeed_ClientID;\n $clientSecret = $siteConfig->VimeoFeed_ClientSecret;\n\n $this->lib;\n\n $this->lib = new \\Vimeo\\Vimeo($this->appID, $this->appSecret);\n $this->lib->setToken($siteConfig->VimeoFeed_AppToken);\n\n if ($clientID && $clientSecret) {\n if ($accessToken = $this->getConfigToken()) {\n $this->lib->setToken($accessToken);\n }\n }\n }", "public function __construct()\r\n {\r\n if(10 == func_num_args())\r\n {\r\n $this->nbTypos = func_get_arg(0);\r\n $this->firstMatchedWord = func_get_arg(1);\r\n $this->proximityDistance = func_get_arg(2);\r\n $this->userScore = func_get_arg(3);\r\n $this->geoDistance = func_get_arg(4);\r\n $this->geoPrecision = func_get_arg(5);\r\n $this->nbExactWords = func_get_arg(6);\r\n $this->words = func_get_arg(7);\r\n $this->filters = func_get_arg(8);\r\n $this->matchedGeoLocation = func_get_arg(9);\r\n }\r\n }", "public function __construct()\n {\n if (7 == func_num_args()) {\n $this->apiKey = func_get_arg(0);\n $this->emailDetails = func_get_arg(1);\n $this->xAPIHEADER = func_get_arg(2);\n $this->settings = func_get_arg(3);\n $this->recipients = func_get_arg(4);\n $this->attributes = func_get_arg(5);\n $this->files = func_get_arg(6);\n }\n }", "public function __construct()\n {\n $this->reelsFeed = new ReelsFeed();\n }" ]
[ "0.71806526", "0.6607335", "0.65383977", "0.63083553", "0.61423564", "0.59835494", "0.5948731", "0.5912711", "0.5886852", "0.5837859", "0.5786096", "0.5778074", "0.5747876", "0.5714575", "0.5665428", "0.5655477", "0.56364685", "0.56341755", "0.56280804", "0.5624372", "0.5547261", "0.55389255", "0.55313236", "0.5509717", "0.55018795", "0.54990494", "0.5494775", "0.54831344", "0.5480871", "0.54782754" ]
0.6642562
1
Create a signed signature of the parameters. Return a parameter string that can be tacked onto the end of a URL.
public function signParams($params) { $signing = ''; $values = array(); $secret = $this->getSecret(); ksort($params); foreach($params as $key => $value) { $signing .= $key . $value; $values[] = $key . '=' . urlencode($value); } $values[] = 'api_sig=' . md5($secret . $signing); return implode('&', $values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_signable_parameters()\n {\n // Grab all parameters\n $params = $this->parameters;\n\n // Remove oauth_signature if present\n if (isset($params['oauth_signature']))\n unset($params['oauth_signature']);\n\n // Urlencode both keys and values\n $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));\n $values = OAuthUtil::urlencode_rfc3986(array_values($params));\n $params = array_combine($keys, $values);\n\n // Sort by keys (natsort)\n uksort($params, 'strcmp');\n\n // Generate key=value pairs\n $pairs = array();\n foreach ($params as $key=>$value )\n {\n if (is_array($value))\n {\n // If the value is an array, it's because there are multiple\n // with the same key, sort them, then add all the pairs\n natsort($value);\n foreach ($value as $v2)\n $pairs[] = $key . '=' . $v2;\n }\n else\n $pairs[] = $key . '=' . $value;\n }\n\n // Return the pairs, concated with &\n return implode('&', $pairs);\n }", "function get_signable_parameters($params){\n $sorted = $params;\n ksort($sorted);\n\n $total = array();\n foreach ($sorted as $k => $v) {\n if ($k == 'oauth_signature') {\n continue;\n }\n\n $total[] = rawurlencode($k) . '=' . rawurlencode($v);\n }\n return implode('&', $total);\n }", "public function get_signable_parameters() {\n\t\t// Grab all parameters\n\t\t$params = $this->params;\n\n\t\t// Remove oauth_signature if present\n\t\t// Ref: Spec: 9.1.1 (\"The oauth_signature parameter MUST be excluded.\")\n\t\tif ( isset( $params[ static::prefix . 'signature' ] ) ) {\n\t\t\tunset( $params[ static::prefix . 'signature' ] );\n\t\t}\n\n\t\treturn \\OAuthSignature::build_http_query( $params );\n\t}", "private function _generateSignature($params, $request_method = 'GET', $url = self::API_REST_URL)\n {\n uksort($params, 'strcmp');\n $params = self::url_encode_rfc3986($params);\n\n // Make the base string\n $base_parts = array(\n strtoupper($request_method),\n $url,\n urldecode(http_build_query($params, '', '&'))\n );\n $base_parts = self::url_encode_rfc3986($base_parts);\n $base_string = implode('&', $base_parts);\n\n // Make the key\n $key_parts = array(\n $this->_consumer_secret,\n ($this->_token_secret) ? $this->_token_secret : ''\n );\n $key_parts = self::url_encode_rfc3986($key_parts);\n $key = implode('&', $key_parts);\n\n // Generate signature\n return base64_encode(hash_hmac('sha1', $base_string, $key, true));\n }", "public function getSignatureBaseString()\n {\n $parts = array(\n $this->getNormalizedHttpMethod(),\n $this->getNormalizedHttpUrl(),\n $this->getSignableParameters()\n );\n\n $parts = Utils::urlencodeRfc3986($parts);\n\n return implode('&', $parts);\n }", "public function get_signature_base_string() {\n\t\t$parts = \\OAuthSignature::urlencode_rfc3986( array(\n\t\t\t$this->get_normalized_http_method(),\n\t\t\t$this->get_normalized_http_url(),\n\t\t\t$this->get_signable_parameters(),\n\t\t) );\n\n\t\treturn implode( '&', $parts );\n\t}", "public function get_signature_base_string() {\n $parts = array(\n $this->get_normalized_http_method(),\n $this->get_normalized_http_url(),\n $this->get_signable_parameters()\n );\n\n $parts = OAuthUtil::urlencode_rfc3986($parts);\n\n return implode('&', $parts);\n }", "public function get_signature_base_string()\n {\n $parts = array(\n $this->get_normalized_http_method(),\n $this->get_normalized_http_url(),\n $this->get_signable_parameters()\n );\n\n $parts = OAuthUtil::urlencode_rfc3986($parts);\n\n return implode('&', $parts);\n }", "private function generate_signature()\n {\n $phrase = implode('', func_get_args());\n /**\n * Sign data and make final signature\n */\n $signature = '';\n $private_key_id = openssl_pkey_get_private($this->private_key);\n if (!openssl_sign($phrase, $signature, $private_key_id, OPENSSL_ALGO_SHA1)) {\n throw new BankException('OPEN SSL SIGN ERROR');\n }\n\n return $signature;\n }", "protected function generateSignature()\n {\n // set the expire time to 5 minutes\n $expires = time() + 300;\n\n // put the parameters in a different line\n $stringToSign = $this->accessID.\"\\n\".$expires;\n\n // get the binary output of the hmac has\n $binarySignature = hash_hmac('sha1', $stringToSign, $this->secretKey, true);\n\n // Base64-encode and url-encode\n $urlSafeSignature = urlencode(base64_encode($binarySignature));\n\n return array('expires' => $expires, 'signature' => $urlSafeSignature);\n }", "function _calculateStringToSignV2(array $parameters) {\n $data = 'POST';\n $data .= \"\\n\";\n $endpoint = parse_url ($this->_config['ServiceURL']);\n $data .= $endpoint['host'];\n $data .= \"\\n\";\n $uri = array_key_exists('path', $endpoint) ? $endpoint['path'] : null;\n if (!isset ($uri)) {\n $uri = \"/\";\n }\n $uriencoded = implode(\"/\", array_map(array($this, \"_urlencode\"), explode(\"/\", $uri)));\n $data .= $uriencoded;\n $data .= \"\\n\";\n uksort($parameters, 'strcmp');\n $data .= $this->_getParametersAsString($parameters);\n return $data;\n }", "public function get_signable_parameters() {\n // Grab all parameters\n $params = $this->parameters;\n\n // Remove oauth_signature if present\n // Ref: Spec: 9.1.1 (\"The oauth_signature parameter MUST be excluded.\")\n if (isset($params['oauth_signature'])) {\n unset($params['oauth_signature']);\n }\n\n return OAuthUtil::build_http_query($params);\n }", "protected static function _sign($parameters)\n\t{\n\t\t// Fixup our private key, copy-pasting the key might lead to whitespace faults\n\t\tif(!preg_match('/-----BEGIN (RSA )?PRIVATE KEY-----(.*)-----END (RSA )?PRIVATE KEY-----/si', Transip_ApiSettings::$privateKey, $matches))\n\t\t\tdie('<p>Could not find your private key, please supply your private key in the ApiSettings file. You can request a new private key in your TransIP Controlpanel.</p>');\n\n\t\t$key = $matches[2];\n\t\t$key = preg_replace('/\\s*/s', '', $key);\n\t\t$key = chunk_split($key, 64, \"\\n\");\n\n\t\t$key = \"-----BEGIN PRIVATE KEY-----\\n\" . $key . \"-----END PRIVATE KEY-----\";\n\n\t\t$digest = self::_sha512Asn1(self::_encodeParameters($parameters));\n\t\tif(!@openssl_private_encrypt($digest, $signature, $key))\n\t\t\tdie('<p>Could not sign your request, please supply your private key in the ApiSettings file. You can request a new private key in your TransIP Controlpanel.</p>');\n\n\t\treturn base64_encode($signature);\n\t}", "public function getSignedUrl(): string\n {\n $query = base64_encode(json_encode($this->buildQuery()));\n $signature = hash_hmac('sha256', $this->templateId . $query, $this->token);\n\n return $this->signedUrlBase . $this->templateId . '.png?' . http_build_query(['s' => $signature, 'v' => $query]);\n }", "protected function prepareSignature($uri, &$params)\n {\n $paramsToBeSigned = $params;\n $stringToBeSigned = '';\n\n // 1. Extract all query param EXCEPT ' sign ', ' access_token ', reorder the params based on alphabetical order.\n unset($paramsToBeSigned['sign'], $paramsToBeSigned['access_token']);\n ksort($paramsToBeSigned);\n\n // 2. Concat all the param in the format of {key}{value}\n foreach ($paramsToBeSigned as $k => $v) {\n if (!is_array($v)) {\n $stringToBeSigned .= \"$k$v\";\n }\n }\n\n // 3. Append the request path to the beginning\n $stringToBeSigned = $uri . $stringToBeSigned;\n\n // 4. Wrap string generated in step 3 with app_secret.\n $stringToBeSigned = $this->getAppSecret() . $stringToBeSigned . $this->getAppSecret();\n\n // Encode the digest byte stream in hexadecimal and use sha256 to generate sign with salt(secret).\n $params['sign'] = hash_hmac('sha256', $stringToBeSigned, $this->getAppSecret());\n }", "private function buildSigningBase(): string {\r\n $parameterString = http_build_query($this->clientParams);\r\n return \"$this->httpMethod&\" . urlencode($this->host . $this->endpoint) . \"&\" . urlencode($parameterString);\r\n }", "public static function generateSignature($params)\n {\n $queryParams = $params . getenv('API_KEY') . getenv('API_SECRET');\n $signature = md5($queryParams);\n\n return $signature;\n }", "function sign($param,$key){\n\n $sign = \"\";\n foreach($param as $k => $v){\n $sign .= $k.\"=\".$v.\"&\";\n }\n\n $sign .= \"key=\".$key;\n $sign = strtoupper(md5($sign));\n return $sign;\n\n}", "protected function generate_signature($method = null, $url = null, $params = null)\n\t{\n\t\tif (empty($method) || empty($url))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// concatenating\n\t\t$concat_params = '';\n\n\t\tforeach ($params as $k => $v)\n\t\t{\n\t\t\t$v = $this->encode_rfc3986($v);\n\t\t\t$concat_params .= \"{$k}={$v}&\";\n\t\t}\n\n\t\t$concat_params = $this->encode_rfc3986(substr($concat_params, 0, -1));\n\n\t\t// normalize url\n\t\t$normalized_url = $this->encode_rfc3986($this->normalize_url($url));\n\t\t$method = $this->encode_rfc3986($method); // don't need this but why not?\n\n\t\treturn $this->sign_string(\"{$method}&{$normalized_url}&{$concat_params}\");\n\t}", "private function getSignature()\n\t{\n\t\t$string_to_sign = mb_convert_encoding(\n\t\t\t$this->http_verb . $this->uri . $this->timestamp . $this->nonce,\n\t\t\t'UTF-8'\n\t\t);\n\t\treturn base64_encode(\n\t\t\thash_hmac(\n\t\t\t\t'sha1',\n\t\t\t\t$string_to_sign,\n\t\t\t\t$this->secret,\n\t\t\t\ttrue\n\t\t\t)\n\t\t);\n\t}", "protected function generate_signature($payload_params, $timestamp)\n {\n $payload = \"timestamp:{$timestamp}\"; \n foreach ($payload_params as $key => $value) {\n $payload = \"{$payload},{$key}:{$value}\";\n }\n $tmp_signature = hash_hmac(\"sha256\", $payload, $this->client_secret);\n $base64_signature = trim(base64_encode($tmp_signature));\n return $base64_signature;\n }", "public function getSignableParameters()\n {\n // Grab all parameters\n $params = $this->parameters;\n\n // Remove oauth_signature if present\n // Ref: Spec: 9.1.1 (\"The oauth_signature parameter MUST be excluded.\")\n if (isset($params['oauth_signature'])) {\n unset($params['oauth_signature']);\n }\n\n return Utils::buildHttpQuery($params);\n }", "public function signature() {\r\n\t\t$signature = \"\";\r\n\t\tif ($this->isFinal) {\r\n\t\t\t$signature .= \"final \";\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->isPublic) {\r\n\t\t\t$signature .= \"public \";\r\n\t\t}\r\n\t\telseif ($this->isPrivate) {\r\n\t\t\t$signature .= \"private \";\r\n\t\t}\r\n\t\telseif ($this->isProtected) {\r\n\t\t\t$signature .= \"protected \";\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->isStatic) {\r\n\t\t\t$signature .= \"static \";\r\n\t\t}\r\n\t\t$signature .= \"function \".$this->name.\" \";\r\n\t\t$signature .= \"(\";\r\n\t\t$params = array();\r\n\t\tforeach($this->parameters as $parameter) {\r\n\t\t\t$params[] = $parameter->signature();\r\n\t\t}\r\n\t\t$signature .= implode(\", \",$params);\r\n\t\t$signature .= \")\";\r\n\t\treturn $signature;\r\n\t}", "public function getSignature()\n {\n $input = $this->getArgs();\n\n $str = \"\";\n foreach ($input as $key => $val) {\n $str .= $key . \"=\" . $val . \"&\";\n }\n\n $str .= \"password=\" . $this->config->password;\n return $this->hashFunction($str);\n }", "public static function generateSignatureBase(\\OAuth\\Request $request){\n\t\t$encoded_parameters = $request->encodeAndSortParameters();\n\n\t\t// apparently you don't use the multi-part params in auth, just the oauth params\n\t\tif($request->getMultipartFlag() === true){\n\t\t\t$new_params = [];\n\t\t\tforeach($encoded_parameters as $k=>$v){\n\t\t\t\tif(strpos($k, 'oauth') !== false)\n\t\t\t\t\t$new_params[$k] = $v;\n\t\t\t}\n\t\t\t$encoded_parameters = $new_params;\n\t\t}\n\t\t\n\t\t// start out signature_base with the parameters\n\t\t$signature_base = array();\n\t\tforeach($encoded_parameters as $k=>$v){\n\t\t\t$signature_base[] = $k.'='.$v;\n\t\t}\n\t\t$signature_base = implode('&', $signature_base);\n\n\t\treturn $request->getMethod().'&'.rawurlencode($request->getUrl()).'&'.rawurlencode($signature_base);\n\t}", "private function getSignature(): string {\r\n return base64_encode(hash_hmac(\"sha1\", $this->buildSigningBase(), $this->buildSigningKey(), true));\r\n }", "public static function getSignatureString($params, $secret) {\n $values = array();\n self::extractParamValues($params, $values);\n sort($values, SORT_STRING);\n $string = $secret . implode('', $values);\n return $string;\n }", "public function sign($http_method, $url, $params, $secret) {\n $sig = array(\n strtoupper($http_method),\n preg_replace('/%7E/', '~', rawurlencode($url)),\n rawurlencode($this->get_signable_parameters($params)),\n );\n\n $base_string = implode('&', $sig);\n $sig = base64_encode(hash_hmac('sha1', $base_string, $secret, true));\n return $sig;\n }", "function signUrl($myUrlToSign, $privateKey)\n{\n // parse the url\n $url = parse_url($myUrlToSign);\n\n $urlPartToSign = $url['path'] . \"?\" . $url['query'];\n\n // Decode the private key into its binary format\n $decodedKey = decodeBase64UrlSafe($privateKey);\n\n // Create a signature using the private key and the URL-encoded\n // string using HMAC SHA1. This signature will be binary.\n $signature = hash_hmac(\"sha1\",$urlPartToSign, $decodedKey, true);\n\n $encodedSignature = encodeBase64UrlSafe($signature);\n\n return $myUrlToSign.\"&signature=\".$encodedSignature;\n}", "public function buildSignatureString($httpmethod, $params, $oauth, $baseUrl) {\n $encodedParams = array();\n\n // Merge this query parameters array with the Oauth values array\n $mergedParams = array_merge($params, $oauth);\n\n // Sort alphabetically by key\n ksort($mergedParams);\n\n // Percent encode all these values\n foreach($mergedParams as $key => $value) {\n $encodedParams[] = rawurlencode($key) . '=' . rawurlencode($value);\n }\n\n // Append method with base URL and then split out all the key/values from array and percent encode them all as per docs\n return $signature = strtoupper($httpmethod) . '&' . rawurlencode($baseUrl) . '&' . rawurlencode(implode('&', $encodedParams));\n }" ]
[ "0.7193946", "0.7172373", "0.70695317", "0.70535463", "0.7001584", "0.6977871", "0.6973665", "0.69485575", "0.68774813", "0.6853568", "0.68328834", "0.67862785", "0.6766751", "0.6756242", "0.6714858", "0.67004675", "0.6683943", "0.6654663", "0.6631227", "0.6628554", "0.6587536", "0.65629697", "0.65353197", "0.65093225", "0.6507445", "0.6489216", "0.6415837", "0.6322645", "0.63178617", "0.62796086" ]
0.73691624
0
Return the Flickr user id of the current authenticated user. If the authentication info is incorrect, NULL will be returned.
public function getUserId() { $response = $this->execute(array('method' => 'flickr.auth.checkToken'), 60); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['auth']['user']['nsid']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAuthUserId() {\r\n global $app, $log;\r\n $email = $app->request->headers(\"PHP_AUTH_USER\");\r\n $password = $app->request->headers(\"PHP_AUTH_PW\");\r\n\r\n if ($email && $password) {\r\n $row = DB::queryFirstRow(\"SELECT * FROM users WHERE email=%s\", $email);\r\n if ($row && $row['password'] == $password) {\r\n return $row['ID'];\r\n }\r\n }\r\n\r\n $log->debug(\"BASIC authentication failed for user \" . $email . \" from \" . $_SERVER['REMOTE_ADDR']);\r\n $app->response->status(401);\r\n return FALSE;\r\n}", "public function getUserId() {\n\t\tif ($this->logged()) {\n\t\t\treturn $_SESSION['auth']['id'];\n\t\t}\n\t\treturn false;\n\t}", "function user_id () {\r\n\t$info = user_info();\r\n\treturn (isset($info[0]) ? $info[0] : 0);\r\n}", "public function getUserId()\r\n\t{\r\n\t\t$user = parent::getUser();\r\n\t\tif(!($user instanceof User))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $user->getId();\r\n\t}", "public function getUserId() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_USER_ID])) {\n return $_SESSION[self::SESSION_FIELD_USER_ID];\n } else {\n return null;\n }\n }", "public function getUserId(){\n \n if ($user = JWTAuth::parseToken()->authenticate()) {\n $userId = $user->id;\n return $userId;\n }\n }", "public function get_user_id();", "public static function getUserId(): ?string\n {\n if (Self::checkIsLogged()) {\n if (!isset($auth)) {\n $auth = new Auth(DbManager::openDB(), null, null, false);\n }\n return $auth->getUserId();\n } else {\n return null;\n }\n\n }", "public function getAuthIdentifier() {\n return $this->id_user;\n }", "public function getUser_id()\n {\n return isset($this->user_id) ? $this->user_id : null;\n }", "private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }", "public function getUserId()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $userId = $CI->session->userdata('user_id');\n return $userId;\n }\n }", "public function getUserId() {\n\t\t\tif ($this->getUser() !== null) {\n\t\t\t\treturn $this->getUser()->getId();\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public function getAuthUserId() {\n\t\treturn (!empty($this->authUserId)?$this->authUserId:Mage::getSingleton('admin/session')->getUser()->getId());\n\t}", "public function getUserId()\n {\n return $this->authenticator->getUserId();\n }", "public function getUserId() {\n\t\treturn $this->Session->read('UserAuth.User.id');\n\t}", "public function getUserIdFromAPI() {\n $facebook = $this->facebookService->getFacebook();\n $userId = $facebook->getUser();\n\n if ($userId) {\n try {\n // Proceed knowing you have a logged in user who's authenticated.\n $user_profile = $facebook->api('/me');\n } catch (FacebookApiException $e) {\n error_log($e);\n $userId = null;\n }\n }\n return $userId;\n }", "public function id()\n {\n if ($this->user()) {\n return $this->user()->getAuthIdentifier();\n }\n return null;\n }", "public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }", "public static function getUserId() {\n if(self::$_identity) {\n return self::$_identity->userid;\n }\n return null;\n }", "public function getUserID() {\n\t\tif (is_numeric($this->user_id)) {\n\t\t\treturn $this->user_id;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function get_user_id()\n {\n return self::getUser();\n }", "public function user_id()\n\t{\n\t\tif ($this->logged_in())\n\t\t{\n\t\t\treturn $this->_facebook->getUser();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->login_url();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getAuthIdentifier()\n {\n return (string) $this->user['id'];\n }", "function getAuthenticatedUser()\n {\n if (isset($_SESSION['MFW_authenticated_user'])) {\n return $_SESSION['MFW_authenticated_user'];\n }\n\n return null;\n }", "public function getUserID($context)\n {\n if(isset($context['user'])) {\n return $context['user']->id;\n }\n if(isset($context['user_id'])) {\n return $context['user_id'];\n }\n if(isset($GLOBALS['current_user'])) {\n return $GLOBALS['current_user']->id;\n }\n return null;\n }", "public function getUserId() {\n return $this->user === null ? null : $this->user->id;\n }", "public function getLoginUserId(){\n $auth = Zend_Auth::getInstance();\n if($auth->hasIdentity())\n {\n return $loginUserId = $auth->getStorage()->read()->id;\n }\n }", "protected function getUserId(): int|string|null\n {\n if (!isset($this->userId)) {\n $this->userId = Auth::guard(config('nova.guard'))->id() ?? null;\n }\n\n return $this->userId;\n }", "public function getUserId()\r\r\n {\r\r\n return $this->signedRequest ? $this->signedRequest->getUserId() : null;\r\r\n }" ]
[ "0.72362965", "0.72320545", "0.7120621", "0.7111939", "0.70952225", "0.7031982", "0.70226246", "0.7022301", "0.7006451", "0.6980121", "0.6977634", "0.696011", "0.6945364", "0.6943848", "0.69334257", "0.6903515", "0.6890438", "0.6879291", "0.6871221", "0.6869946", "0.68442464", "0.68398803", "0.6829923", "0.68156683", "0.68150985", "0.68129283", "0.68095315", "0.6802125", "0.67931044", "0.67908686" ]
0.7762619
0
Returns a list of the user's favorite photos. Only photos which the calling user has permission to see are returned.
function favorites_getList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) { $params = array(); $params['method'] = 'flickr.favorites.getList'; if ($user_id) $params['user_id'] = $user_id; $params['per_page'] = $per_page; $params['page'] = $page; if ($extras) $params['extras'] = $extras; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function favorites_getPublicList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$user_id = ($user_id) ? $user_id : $this->getUserId();\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getPublicList';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function favorites() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($id, $auth)) {\n $this->response('', 400);\n }\n if ($id > 0) {\n $query = \"select * from favorites where user_id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n } \n }", "public function getFavorites();", "function photos_getFavorites ($photo_id, $page = 1, $per_page = 20) {\n $response = $this->execute(array('method' => 'flickr.photos.getFavorites', 'photo_id' => $photo_id, 'page' => $page, 'per_page' => $per_page));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photo']['person'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function favorites() {\n\t\t$favoriteSounds = Sound::whereHas('favorite', function($query) {\n\t\t\t$user = Auth::user();\n\n\t\t\t$query->where('userId', '=', $user->id);\n\t\t});\n\n\t\treturn Responder::success([\n\t\t\t'favoriteSounds' => $favoriteSounds->get()\n\t\t]);\n\t}", "static public function getFavorites() {\r\n self::initFav();\r\n return self::$FAV;\r\n }", "public function favorites()\n {\n $favoriteClass = config('favorable.favorite_model');\n\n return $this->morphMany($favoriteClass, 'favoriteable');\n }", "public function find_favorites() {\n\t\tstatic $favorites;\n\n\t\tif (!is_array($favorites)) {\n\t\t\t$favorites = array();\n\t\t\tif ($this->loaded()) {\n\t\t\t\t$users = db::build()->select('user_id')->from('favorites')->where('event_id', '=', $this->id)->execute()->as_array();\n\t\t\t\tforeach ($users as $user) {\n\t\t\t\t\t$favorites[(int)$user['user_id']] = (int)$user['user_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $favorites;\n\t}", "function getRandomFavoritePhoto($userEmail) {\n $api = new Phlickr_Api(FLICKR_API_KEY, FLICKR_API_SECRET);\n // load a saved cache file if it exists, set the expiration limit to a week.\n $api->setCache(Phlickr_Cache::createFrom(CACHE_FILE, 60*60*24*7));\n\n // select a random favorite photo\n $user = Phlickr_User::findByEmail($api, $userEmail);\n $favlist = $user->getFavoritePhotoList();\n $photo = $favlist->getRandomPhoto();\n\n assert(!is_null($photo));\n\n // serialize and save the cache file\n $api->getCache()->saveAs(CACHE_FILE);\n\n return $photo;\n}", "public function favorite()\n {\n $mentor = User::leftJoin('review_mentor', 'user_id_mentor', '=', 'users.id')\n ->where('mentor', 'Y')\n ->groupBy('users.id')\n ->select('users.id', 'users.first_name', 'users.last_name', 'users.photo',\n DB::raw(\"SUM(CASE WHEN is_like = 'Y' THEN 1 ELSE 0 END) as islike \"),\n DB::raw(\"SUM(CASE WHEN is_like = 'N' THEN 1 ELSE 0 END) as unlike \")\n )\n ->get();\n return MentorFavorite::collection($mentor);\n }", "public function myfavorites_get()\n {\n $user = $this->getCurrentUser();\n $criteria = new \\Doctrine\\Common\\Collections\\Criteria();\n //AQUI TODAS LAS EXPRESIONES POR LAS QUE SE PUEDE BUSCAR CON TEXTO\n $expresion = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"favorite\", \\Doctrine\\Common\\Collections\\Expr\\Comparison::EQ, 1);\n $criteria->where($expresion);\n $criteria->orderBy(array(\"visited_at\"=>\"DESC\"));\n $relacion = $user->getUserservices()->matching($criteria)->toArray();\n $result[\"desc\"] = \"Listado de los servicios marcados como favoritos por el usuario\";\n $result[\"data\"] = array();\n foreach ($relacion as $servicerel) {\n $service_obj = $servicerel->getService();\n $service_obj->loadRelatedData($user, null, site_url());\n $result[\"test\"] = $service_obj->loadRelatedUserData($user);\n $result[\"data\"][] = $service_obj;\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n\n }", "public function getAllFavorites($user_id);", "public function favorites($user, $options = []);", "public function my_favs(){\n $current_user=Auth::user();\n if(!$current_user){ return false; }\n\n $favorites=Favorites::where('user_id',$current_user->id)->orderBy('id', 'desc')->get();\n\n $return=[];\n foreach ($favorites as $key => $value) {\n $data = json_decode(app('App\\Http\\Controllers\\GiphyController')->single($value->gif_uid));\n $return[]=($data->data);\n }\n\n return $return;\n\n }", "public function getFavorites()\n {\n $tricks = $this->tricks->findAllFavorites($this->user);\n\n $this->view('user.favorites', compact('tricks'));\n }", "public function favorite()\n {\n $attributes = ['user_id' => auth()->id()];\n\n if (! $this->favorites()->where($attributes)->exists()) {\n return $this->favorites()->create($attributes);\n }\n }", "public function favorites()\n {\n return $this->morphMany(Favorite::class, 'favorited');\n }", "function getFavouriteTags(){\n //first we get all the info on tags that belong to tasks that the current user has clicked on\n $clickInfo = $this->qh->getClickTagInfo($_SESSION['userID']);\n return $this->getFavourites($clickInfo, 'TagID');\n }", "public function getFotos()\n\t{\n\t\treturn $this->fotos;\n\t}", "public function favorite(){\n $attributes = ['user_id' => auth()->id()];\n\n if(! $this->favorites()->where($attributes)->exists()){\n return $this->favorites()->create($attributes);\n }\n }", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function index()\n {\n //\n return UserFavorite::get();\n }", "public function favourite()\n {\n return $this->belongsToMany('App\\User', 'favourite', 'media_id', 'user_id');\n }", "private function get_user_favorite_publics(){\r\n global $USER;\r\n\r\n if(isset($USER) && $USER->id > 0) {\r\n $publics = new PublicsByFunctionUser($USER->id, $this->tab);\r\n if($this->tab == 'formation'){\r\n return $publics->get_favorite_formation_publics();\r\n } else {\r\n return $publics->get_favorite_course_publics();\r\n }\r\n }\r\n return false;\r\n }", "public function favourites()\n {\n return $this->morphMany(Favourite::class, 'favourite');\n }", "public function favorites()\n\t{\n\t\treturn $this->morphMany(Favorite::class, 'favoriteable');\n\t}", "function getAllFoodpornsByFavorite()\n {\n $stmt = self::$_db->prepare(\"SELECT fp.* FROM favorit AS fav LEFT JOIN foodporn AS fp On fav.fs_foodporn = fp.id_foodporn AND fav.fs_user=:uid WHERE id_foodporn IS NOT NULL\");\n $uid = self::getUserID();\n $stmt->bindParam(\":uid\", $uid);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function getFavorites(){\n\n\t$id = getUserID();\n\t$query = \"SELECT networks.area, networks.state, activities.activity_name FROM favorites, networks, activities, unique_networks WHERE user_id = \".$id.\"\"\n\t.\" AND favorites.unique_network_id = unique_networks.unique_network_id\"\n\t.\" AND unique_networks.activity_id = activities.activity_id\"\n\t.\" AND unique_networks.network_id = networks.network_id\";\n\t$result = mysql_query($query) or die(mysql_error());\n\t$favs = array();\n\twhile($row = mysql_fetch_array($result)){\n\t\t$favs[] = $row['area']. \", \". $row['state']. \" - \" .$row['activity_name'];\n\t}\n\treturn $favs;\n}", "public function index() {\n return response()->json([\n 'posts' => auth()->user()->favorites()->orderBy('created_at', 'DESC')->get(),\n ]);\n }", "public function getFavoritesPublications($user)\n {\n return $this->getByFavorite($user);\n }" ]
[ "0.6951597", "0.6951065", "0.6901152", "0.6783222", "0.65645576", "0.65645134", "0.65489775", "0.653162", "0.6520821", "0.64882904", "0.6487816", "0.6480715", "0.6469994", "0.6468104", "0.6425402", "0.63879156", "0.6344827", "0.63429934", "0.6338001", "0.6309637", "0.63036555", "0.6302865", "0.62839204", "0.6283017", "0.622189", "0.62167287", "0.61614597", "0.61533195", "0.6139465", "0.61003155" ]
0.74113095
0
Returns a list of favorite public photos for the given user.
function favorites_getPublicList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) { $user_id = ($user_id) ? $user_id : $this->getUserId(); $params = array(); $params['method'] = 'flickr.favorites.getPublicList'; $params['user_id'] = $user_id; $params['per_page'] = $per_page; $params['page'] = $page; if ($extras) $params['extras'] = $extras; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFavoritesPublications($user)\n {\n return $this->getByFavorite($user);\n }", "public function getPhotoPublications($user)\n {\n return $this->getByCategoryType('Photo', $user);\n }", "function favorites_getList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "private function get_user_favorite_publics(){\r\n global $USER;\r\n\r\n if(isset($USER) && $USER->id > 0) {\r\n $publics = new PublicsByFunctionUser($USER->id, $this->tab);\r\n if($this->tab == 'formation'){\r\n return $publics->get_favorite_formation_publics();\r\n } else {\r\n return $publics->get_favorite_course_publics();\r\n }\r\n }\r\n return false;\r\n }", "function people_getPublicPhotos ($user_id, $per_page = 25, $page = 1, $safe_search = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.people.getPublicPhotos';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\t$params['safe_search'] = $safe_search;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getAllFavorites($user_id);", "public function favorites($user, $options = []);", "function favorites() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($id, $auth)) {\n $this->response('', 400);\n }\n if ($id > 0) {\n $query = \"select * from favorites where user_id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n } \n }", "private function getByFavorite($user)\n {\n $q = $this\n ->getUserPublicationQueryBuilder($user)\n ->andWhere('p.isFavorite = 1')\n ->orderBy('p.publishedAt', 'desc')\n ->getQuery()\n ;\n\n return $q->getResult();\n }", "public function getFavoriteSongs($userId){\n return $this->DB->queryFetchAllAssoc(\"SELECT s.* FROM user u, song s, favorite_songs fs WHERE fs.user_id = u.id AND fs.song_id = s.id AND u.id = $userId\");\n }", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "function photos_getContactsPublicPhotos ($user_id, $count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getContactsPublicPhotos';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['count'] = $count;\n\t\tif ($just_friends) $params['just_friends'] = $just_friends;\n\t\tif ($single_photo) $params['single_photo'] = $single_photo;\n\t\tif ($include_self) $params['include_self'] = $include_self;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function getRandomFavoritePhoto($userEmail) {\n $api = new Phlickr_Api(FLICKR_API_KEY, FLICKR_API_SECRET);\n // load a saved cache file if it exists, set the expiration limit to a week.\n $api->setCache(Phlickr_Cache::createFrom(CACHE_FILE, 60*60*24*7));\n\n // select a random favorite photo\n $user = Phlickr_User::findByEmail($api, $userEmail);\n $favlist = $user->getFavoritePhotoList();\n $photo = $favlist->getRandomPhoto();\n\n assert(!is_null($photo));\n\n // serialize and save the cache file\n $api->getCache()->saveAs(CACHE_FILE);\n\n return $photo;\n}", "public static function get_photos_by_user($user_id) {\n\t\t$photos_array = array();\n\n\t\t$sql = \"SELECT * \n\t\t FROM photo_directory \n\t\t WHERE user_id = {$user_id}\n\t\t ORDER BY time_uploaded DESC;\";\n\t\t$photos_dbo = mysql_query($sql);\n\t\twhile ($row = mysql_fetch_assoc($photos_dbo)) {\n\t\t\tarray_push($photos_array, $row);\n\t\t} \n\n\t\tglobal $firephp;\n\t\t$firephp->log('get_photos_by_user:');\n\t\t$firephp->log($photos_array);\n\t\treturn $photos_array;\n\t}", "public function getAllAvatarsByUser()\n {\n $userId = Auth::user()->id;\n $avatar = Avatar::select('image_url', 'id')->where('user_id', $userId)->get();\n return $avatar;\n }", "function get_favorites($user_id){\n $ch = curl_init();\n $url = $GLOBALS['App-Logic'].\"?\" .http_build_query([\n 'get_favorites' => true, //a flag to execute the right code in App-Logic! \n 'user_id' => $user_id,\n ]);\n\n curl_setopt($ch,CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);\n \n $response = curl_exec($ch);\n curl_close($ch);\n\n return json_decode($response,true);\n\n }", "public function myfavorites_get()\n {\n $user = $this->getCurrentUser();\n $criteria = new \\Doctrine\\Common\\Collections\\Criteria();\n //AQUI TODAS LAS EXPRESIONES POR LAS QUE SE PUEDE BUSCAR CON TEXTO\n $expresion = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"favorite\", \\Doctrine\\Common\\Collections\\Expr\\Comparison::EQ, 1);\n $criteria->where($expresion);\n $criteria->orderBy(array(\"visited_at\"=>\"DESC\"));\n $relacion = $user->getUserservices()->matching($criteria)->toArray();\n $result[\"desc\"] = \"Listado de los servicios marcados como favoritos por el usuario\";\n $result[\"data\"] = array();\n foreach ($relacion as $servicerel) {\n $service_obj = $servicerel->getService();\n $service_obj->loadRelatedData($user, null, site_url());\n $result[\"test\"] = $service_obj->loadRelatedUserData($user);\n $result[\"data\"][] = $service_obj;\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n\n }", "public function getAllPublications($user)\n {\n return $this->getByUser($user);\n }", "private function getUserFavoritePublications($user, $returnQuery = false, $maxResults = null, $firstResult = null)\n {\n $bookmark_post = $this->getRepository('bookmark_post')\n ->createQueryBuilder('bmp');\n $bookmark_post\n ->select('p.id')\n ->leftJoin('bmp.post', 'p')\n ->andWhere($bookmark_post->expr()->eq('bmp.user', ':user'));\n\n $publications = $this->getRepository('post')\n ->createQueryBuilder('post');\n $publications\n ->andWhere($publications->expr()->eq('post.resource', true))\n ->andWhere($publications->expr()->in('post.status', ':status'))\n ->andWhere($publications->expr()->in('post.id', $bookmark_post->getDql()))\n ->setParameters(array(\n 'user' => $user,\n 'status' => array(Post::STATUS_PUBLISHED, Post::STATUS_DRAFTING, Post::STATUS_ARCHIVED)\n ));\n\n if (null !== $maxResults) {\n $publications->setMaxResults($maxResults);\n }\n\n if (null !== $firstResult) {\n $publications->setFirstResult($firstResult);\n }\n\n if ($returnQuery) {\n return $publications->getQuery();\n }\n\n return $publications->getQuery()->getResult();\n }", "public function getFavorites();", "function find_public_photos($ids_of_private_photos, $ids_of_all_users_photos_on_page)\n{\n $public_photos = [];\n\n foreach ($ids_of_all_users_photos_on_page as $photo_id)\n if (!in_array($photo_id, $ids_of_private_photos))\n array_push($public_photos, $photo_id);\n\n return $public_photos;\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}", "function photos_getFavorites ($photo_id, $page = 1, $per_page = 20) {\n $response = $this->execute(array('method' => 'flickr.photos.getFavorites', 'photo_id' => $photo_id, 'page' => $page, 'per_page' => $per_page));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photo']['person'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function my_favs(){\n $current_user=Auth::user();\n if(!$current_user){ return false; }\n\n $favorites=Favorites::where('user_id',$current_user->id)->orderBy('id', 'desc')->get();\n\n $return=[];\n foreach ($favorites as $key => $value) {\n $data = json_decode(app('App\\Http\\Controllers\\GiphyController')->single($value->gif_uid));\n $return[]=($data->data);\n }\n\n return $return;\n\n }", "public function index(User $user)\n {\n $publications = $user->publications->fresh('images', 'conditions', 'categories');\n\n $aux = $publications->sortByDesc('created_at');\n\n return $this->showAll($aux);\n }", "public static function create_by_user_public($a_user_id){\n\n\t\t$request = self::_get_connection()->select(\"SELECT ID from `apine_images` where user_id=$a_user_id OR privacy=2\");\n\t\t$liste = new Liste();\n\t\tif($request != null && count($request) > 0){\n\t\t\tforeach($request as $item){\n\t\t\t\t$liste->add_item(new ApineImage($item['ID']));\n\t\t\t}\n\t\t}\n\t\treturn $liste;\n\t\n\t}", "public static function getFavorites($user_id, $page = 1)\n {\n $count = self::getFavoritesCount($user_id);\n $result = array(\n 'audios' => array(),\n 'load_more' => false,\n 'page' => $page,\n 'total' => $count\n );\n\n if (0 == $count) {\n return $result;\n }\n\n $total_pages = ceil($count / 10);\n\n if ($page > $total_pages) {\n return $result;\n }\n\n $columns = self::$columns;\n $columns = array_map(\n function ($value) {\n return 'A.' . $value;\n },\n $columns\n );\n $columns = implode(',', $columns);\n $query = db()->prepare(\n \"SELECT DISTINCT\n {$columns}\n FROM audios AS A\n INNER JOIN favorites AS F\n ON A.id = F.audio_id\n AND F.user_id = :user_id\n AND A.status = '1'\n ORDER BY F.date_added DESC\n LIMIT :skip, :max\"\n );\n $query->bindValue('user_id', $user_id);\n $query->bindValue(\n 'skip',\n ($page - 1) * self::$per_page,\n PDO::PARAM_INT\n );\n $query->bindValue('max', self::$per_page, PDO::PARAM_INT);\n $query->execute();\n\n while ($audio = $query->fetch(PDO::FETCH_ASSOC)) {\n $result['audios'][] = self::complete($audio);\n }\n \n $result['load_more'] = $page < $total_pages;\n $result['page'] = $page + 1;\n $result['total'] = $count;\n return $result;\n }", "public function getPhotos($userid)\n {\n $stmt = $this->con->prepare(\"SELECT id_foto, caminho, disciplina, dataCreate FROM tbl_foto WHERE fk_usuario = ?\");\n $stmt->bind_param(\"i\", $userid);\n $stmt->execute();\n $stmt->bind_result($id, $caminho, $disciplina, $data);\n $photos = array();\n\n while ($stmt->fetch()) {\n $photo = array();\n $photo['id'] = $id;\n $photo['caminho'] = $caminho;\n $photo['disciplina'] = $disciplina;\n $photo['userid'] = $userid;\n $photo['data'] = $data;\n array_push($photos, $photo);\n }\n\n $stmt->close();\n return $photos;\n }", "public function index()\n {\n //\n return UserFavorite::get();\n }", "public function getMusicPublications($user)\n {\n return $this->getByCategoryType('Music', $user);\n }" ]
[ "0.77330893", "0.7666382", "0.75277483", "0.722145", "0.7196927", "0.7091533", "0.69208944", "0.6708945", "0.6678264", "0.65504897", "0.6491154", "0.6482784", "0.64572716", "0.6451725", "0.6430946", "0.63825727", "0.62879896", "0.6244853", "0.61897665", "0.61817765", "0.6181298", "0.61439854", "0.606273", "0.605977", "0.6046758", "0.6026596", "0.6018812", "0.6017503", "0.60098666", "0.60075057" ]
0.79236317
0
Removes a photo from a user's favorites list.
function favorites_remove ($photo_id) { $response = $this->execute(array('method' => 'flickr.favorites.remove', 'photo_id' => $photo_id), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeFavorites()\n {\n $this->favorites()->delete();\n $this->favoriteCounter()->delete();\n }", "public static function remove_favorite() {\n header( 'HTTP/1.0 200 OK' );\n header( 'Content-Type: application/json' );\n\n $data = array();\n\n if( ! is_user_logged_in() ) {\n $data = array(\n 'success' => false,\n 'message' => __( 'You need to log in at first.', 'realia-favorites' ),\n );\n } else if (!empty($_GET['id'])) {\n $favorites = get_user_meta(get_current_user_id(), 'favorites', true);\n\n if (!empty($favorites) && is_array($favorites)) {\n foreach ($favorites as $key => $property_id) {\n if ($property_id == $_GET['id']) {\n unset($favorites[$key]);\n }\n }\n\n update_user_meta(get_current_user_id(), 'favorites', $favorites);\n\n $data = array(\n 'success' => true,\n );\n } else {\n $data = array(\n 'success' => false,\n 'message' => __('No favorite properties found.', 'realia-favorites'),\n );\n }\n } else {\n $data = array(\n 'success' => false,\n 'message' => __('Property ID is missing.', 'realia-favorites'),\n );\n }\n\n echo json_encode( $data );\n exit();\n }", "public function removeFavorites()\n\t{\n\t\tFavorite::where('favoriteable_type', $this->morphClass)->where('favoriteable_id', $this->id)->delete();\n\n\t\tFavoriteCounter::where('favoriteable_type', $this->morphClass)->where('favoriteable_id', $this->id)->delete();\n\t}", "private function deleteFavorite()\n {\n try\n {\n $request = $_REQUEST;\n\n //check if video id provided\n if( !isset($request['videoid']) || $request['videoid']==\"\" )\n throw_error_msg(\"Video Id not provided.\");\n\n if( !is_numeric($request['videoid']) )\n throw_error_msg(\"Video Id is not numeric.\");\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\"));\n\n $video_id = mysql_clean($request['videoid']);\n global $cbvid;\n $cbvid->action->remove_favorite($video_id);\n \n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'removed from favorites succesfully', \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function deleteFromFavorites($user_id, $item_id);", "function remove_favorite($fav_id,$uid=NULL)\r\n\t{\r\n\t\tglobal $db;\r\n\t\tif(!$uid)\r\n\t\t\t$uid=userid();\r\n\t\tif($this->fav_check($fav_id,$uid))\r\n\t\t{\r\n\t\t\t$db->delete(tbl($this->fav_tbl),array('userid','type','id'),array($uid,$this->type,$fav_id));\r\n\t\t\te(sprintf(lang('fav_remove_msg'), lang($this->name)),'m');\r\n\t\t}else\r\n\t\t\te(sprintf(lang('unknown_favorite'), lang($this->name)));\r\n\t}", "function bp_activity_action_remove_favorite() {\n\n\tif ( ! is_user_logged_in() || ! bp_is_activity_component() || ! bp_is_current_action( 'unfavorite' ) )\n\t\treturn false;\n\n\t// Check the nonce\n\tcheck_admin_referer( 'unmark_favorite' );\n\n\tif ( bp_activity_remove_user_favorite( bp_action_variable( 0 ) ) )\n\t\tbp_core_add_message( __( 'Activity removed as favorite.', 'buddypress' ) );\n\telse\n\t\tbp_core_add_message( __( 'There was an error removing that activity as a favorite, please try again.', 'buddypress' ), 'error' );\n\n\tbp_core_redirect( wp_get_referer() . '#activity-' . bp_action_variable( 0 ) );\n}", "public function remove( $args, $assoc_args ) {\n\t\t$user = $this->get_user_id_from_identifier( $assoc_args['user-id'] );\n\n\t\t// Check if topic exists.\n\t\t$topic_id = $assoc_args['topic-id'];\n\t\tif ( ! bbp_is_topic( $topic_id ) ) {\n\t\t\t\\WP_CLI::error( 'No topic found by that ID.' );\n\t\t}\n\n\t\t\\WP_CLI::confirm( 'Are you sure you want to remove this topic from the user\\'s favorite list?', $assoc_args );\n\n\t\t// True if removed.\n\t\tif ( bbp_remove_user_favorite( $user->ID, $topic_id ) ) {\n\t\t\t\\WP_CLI::success( 'Favorite successfully removed.' );\n\t\t} else {\n\t\t\t\\WP_CLI::error( 'Could not remove favorite.' );\n\t\t}\n\t}", "public function unfavorite($userId=null)\n\t{\n\t\tif(is_null($userId)) {\n\t\t\t$userId = $this->loggedInUserId();\n\t\t}\n\n\t\tif($userId) {\n\t\t\t$favorite = $this->favorites()\n\t\t\t\t->where('user_id', '=', $userId)\n\t\t\t\t->first();\n\n\t\t\tif(!$favorite) { return; }\n\n\t\t\t$favorite->delete();\n\t\t}\n\n\t\t$this->decrementFavoriteCount();\n\t}", "function removeFavorite($id, $name){\n\t\t\t$str_query=\"DELETE FROM cuisine_favorite WHERE fav_id='$id' and username='$name'\";\n\t\t\treturn $this->query($str_query);\n\t\t}", "function deleteFromFavorites() {\n if($this->getRequestMethod() != \"POST\") {\n $this->response('',406);\n }\n $userId = (int)$this->_request['user_id'];\n $videoId = (int)$this->_request['video_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($userId, $auth)) {\n $this->response('',204);\n }\n if($videoId > 0) { \n $query = \"delete from favorites where user_id=$userId and video_id=$videoId;\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => \"Success\", \"msg\" => \"Successfully deleted one record.\");\n $this->response(json_encode($success),200);\n } else {\n $this->response('',204);\n } \n }", "function photo_remove() {\n if ( ! $this->input->is_ajax_request() || ! $this->auth->is_login()) {\n return redirect(config_item('site_url'));\n }\n \n $item = filter($this->uri->segment(3), 'str', 40);\n $photo = $this->media->get_by_id($item);\n \n if ( ! $photo || empty($photo)) {\n log_write(LOG_WARNING, 'Photo not found, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n \n if ($photo->item_author != $this->auth->get_user_id()) {\n log_write(LOG_ERR, 'User is not the author of the photo, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n\n $image = explode('.', $photo->item_filename);\n\n unlink(FCPATH . '/uploads/' . $photo->item_point . '/' . $image[0] . '_thumb.' . $image[1]);\n unlink(FCPATH . '/uploads/' . $photo->item_point . '/' . $image[0] . '.' . $image[1]);\n\n $this->media->remove($item);\n \n return $this->output->set_output(json_encode(array(\n 'code' => 'luck'\n )));\n }", "public function unset_fav($username = '', $id = '') {\n\t\t\n\t\tif ($username == '') return 0;\n\t\tif ($id == '') return 0;\n\t\t\n\t\t$key = $this->_get_user_fav_key($username);\n\t\t\t\t\n\t\t//use current time as score\n\t\t$ret = Redis::zrem($key, $id); \t\t\n\t\tif ($ret == 1)\n\t\t\treturn 1;\n\t\t\n\t\treturn 0;\n\t }", "public function clearUserFavorites()\n\t{\n\t\t$this->collUserFavorites = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function removeCompany()\n {\n\n $company = Auth::user()->favorites()->find($this->request->remove);\n $company->tags()->detach();\n $company->delete();\n\n Session::flash('message', $company->company_name . ' was removed from your favorites.');\n\n return redirect('/favorites');\n\n }", "public function remove($id){\n $user = \\Auth::user();\n $user->festivals()->detach($id);\n\n return redirect('/favorites');\n }", "public function action_remove(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Remove the monument from the user list\n\t\t$favoriteList = new Model_List_Favorite();\n\t\t$favoriteList->remove($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function defavorite($userId=null)\n {\n if (is_null($userId)) {\n $userId = Auth()->id();\n }\n \n if ($userId) {\n $favorite = $this->favorites()\n ->where('user_id', '=', $userId)\n ->first();\n \n if (!$favorite) {\n return;\n }\n \n $favorite->delete();\n }\n\n $this->decrementFavoriteCount();\n }", "public function unfavourite(Request $request)\n {\n $data = $request->all();\n $favourite = Favourite::where([\n \"place_id\" => $data[\"place_id\"],\n \"user_id\" => $data[\"user_id\"]\n ]);\n $favourite->delete();\n return response()->json(['message' => 'deleted']);\n }", "function delete() {\n\t\tif ( $this->getUserID() ) {\n\t\t\t$query = 'DELETE FROM '.system::getConfig()->getDatabase('mofilm_content').'.userEventFavourites WHERE userID = :UserID';\n\t\t\t$oStmt = dbManager::getInstance()->prepare($query);\n\t\t\t$oStmt->bindValue(':UserID', $this->getUserID());\n\t\t\t$oStmt->execute();\n\t\t\t$oStmt->closeCursor();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function removeFromFavorites($objid);", "public function delete(){\r\n\t\t$image = $this->admin_users_model->get_one(array('id'=>$this->uri->segment(2)),'UserAvatar');\r\n\t\t@unlink('../upload/avatar/'.$image);\r\n\t\t$this->admin_users_model->Delete($this->uri->segment(2));\r\n\t\tredirect('admin-users-list');\t\r\n\r\n\r\n\t\t}", "public function deleteProfilePhoto(): void\n {\n if (! Features::managesProfilePhotos()) {\n return;\n }\n\n if (is_null($this->profile_photo_path)) {\n return;\n }\n\n Storage::disk($this->profilePhotoDisk())->delete($this->profile_photo_path);\n\n $this->forceFill([\n 'profile_photo_path' => null,\n ])->save();\n }", "public function removePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id');\n\n //GET LISTING ITEM\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n //GET FILE ID\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n //DELETE PHOTO\n if (!empty($file_id)) {\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n $photo->delete();\n }\n\n //SET PHOTO ID TO ZERO\n $sitereview->photo_id = 0;\n $sitereview->save();\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function destroy(UserFavorite $userFavorite)\n {\n //\n $userFavorite->delete();\n }", "function ciniki_poma_favItemDelete(&$ciniki, $tnid, $args) {\n \n //\n // Check args\n //\n if( !isset($args['object']) || $args['object'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.poma.29', 'msg'=>'No item specified.'));\n }\n if( !isset($args['object_id']) || $args['object_id'] < 1 || $args['object_id'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.poma.30', 'msg'=>'No item specified.'));\n }\n if( !isset($args['customer_id']) || $args['customer_id'] < 1 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.poma.31', 'msg'=>'No customer specified.'));\n }\n\n //\n // Check if item already exists as a fav\n //\n $strsql = \"SELECT id, uuid, status \"\n . \"FROM ciniki_poma_customer_items \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND itype = 20 \"\n . \"AND object = '\" . ciniki_core_dbQuote($ciniki, $args['object']) . \"' \"\n . \"AND object_id = '\" . ciniki_core_dbQuote($ciniki, $args['object_id']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.poma', 'item');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.poma.32', 'msg'=>'Unable to add favourite.', 'err'=>$rc['err']));\n }\n //\n // Remove the favourite, and if multiple rows due to bug, remove all rows\n //\n if( isset($rc['rows']) && count($rc['rows']) > 0 ) {\n foreach($rc['rows'] as $row) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectDelete');\n $rc = ciniki_core_objectDelete($ciniki, $tnid, 'ciniki.poma.customeritem', $row['id'], $row['uuid'], 0x07);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n }\n\n return array('stat'=>'ok');\n}", "public function removePhoto($value)\n {\n $key = array_search($value, $this->photos);\n if($key !== false) {\n unset($this->photos[$key]);\n }\n }", "public function removeFavourite($book_id, $book_lang){\n\t\t$user_id = $_SESSION['activeUser']->getId();\n\t\tUtilidades::_log(\"removeFavourite($user_id, $book_id, $book_lang)\");\n\t\t\n\t\t$query = 'DELETE FROM favourites \n\t\t\t\t\tWHERE user_id = :user_id\n\t\t\t\t\t AND book_id = :book_id\n\t\t\t\t\t AND book_lang = :book_lang';\n\t\t$db=DB::conectar();//Devuelve conexión\n\t\t$delete=$db->prepare($query);\n\t\t//Bind values\n\t\t$delete->bindValue('user_id',$user_id);\n\t\t$delete->bindValue('book_id',$book_id);\n\t\t$delete->bindValue('book_lang',$book_lang);\n\t\t\n\t\t$delete->execute();\n\t\t\n\t\tUtilidades::_log(\"Eliminado.\");\n\t}", "public function unFavoritePost(Post $post){\n\t Auth::user()->favorites()->detach($post->id);\n\t return back();\n\t}", "public function destroy($id)\n {\n $model = FavoritesModel::where('users_id','=',$request->input('users_id'))->where('news_id','=',$request->input('news_id'))->first();\n if($model->delete()){\n return Common::returnErrorResult(200,'取消收藏成功','');\n }\n else{\n return Common::returnErrorResult(400,'传参错误','');\n }\n // \\Auth::user()->favorites()->detach($id);\n // return redirect()->back();\n }" ]
[ "0.6962366", "0.6777098", "0.66394377", "0.66252553", "0.6521929", "0.6515568", "0.65061086", "0.64308417", "0.64284986", "0.64239705", "0.64213306", "0.6409266", "0.6301437", "0.62294173", "0.62175995", "0.6208038", "0.61591506", "0.6157689", "0.6106015", "0.6069731", "0.6045002", "0.60203916", "0.5964848", "0.5943878", "0.5931961", "0.5924608", "0.59121346", "0.5891361", "0.5860025", "0.5852867" ]
0.71413577
0
/ People methods Return a user's NSID, given their email address
function people_findByEmail($find_email) { $response = $this->execute(array('method' => 'flickr.people.findByEmail', 'find_email' => $find_email)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['user']['nsid']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_user_id_from_string($email_or_login)\n {\n }", "public function getIdentifier()\n {\n return $this->user->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->getEmail();\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "function fetch_user_Idn($email)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email\t=\tsanitize($email);\n\n\t\t$query = \"SELECT `student_Idn` FROM `student` WHERE `email` = '$email'\";\n\t\t$run_query = mysqli_query($Oau_auth, $query);\n\t\t$rows = mysqli_fetch_assoc($run_query);\n\t\t$student_Idn = $rows['student_Idn'];\n\t\treturn $student_Idn;\n\n\t}", "function get_user_id($db, $email)\n{\n\t$sql = \"SELECT id FROM users where email = :email\";\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':email'=>$email));\n\t$us = $st->fetchAll();\n\treturn $us[0]['id'];\n\n}", "protected function userIDEmail ($email)\n {\n \n $user = Model_users::find('all', array\n (\n 'where' => array\n (\n array('email'=>$email),\n )\n ));\n if(!empty($user))\n {\n $id=0;\n foreach ($user as $key => $value)\n {\n $id = $user[$key]->id;\n }\n return $id; \n } \n }", "function getEmailId($eid)\n{\n\t$password=\"k4heNatH\";\n\t$ds=ldap_connect(\"ldap://prodldap.honeywell.com\");\n\tif ($ds) {\n\t\t$dn=\"cn=atlassian-prod,ou=ApplicationUsers,o=honeywell\";\n\t\t$r=ldap_bind($ds,$dn,$password);\n\t\t$sr=ldap_search($ds, \"o=honeywell\",\"uid=E$eid\");\n\t\t$info = ldap_get_entries($ds, $sr);\n\t\tfor ($i=0; $i<$info[\"count\"]; $i++) {\n\t\t\t$dn=$info[$i][\"dn\"];\n\t\t\t$name=$info[$i][\"cn\"][0] ;\n\t\t\t$email= $info[$i][\"mail\"][0];\n\t\t}\n\t\tldap_close($ds);\n\t}\n\telse {\n\t\techo \"<h4>Unable to connect to LDAP server</h4>\";\n\t}\n\treturn $email;\n}", "public function getUidFromEmail($email);", "public function get_user_by_email_address($email_address, $organization_id);", "function getIdFromEmailUser($db, $user_email) {\n\n $SELECT_ID_USER = \"SELECT user_id FROM user WHERE user_email = ?\";\n\n $resultats = $db->prepare($SELECT_ID_USER);\n $resultats->execute(array($user_email));\n $row = $resultats->fetch(PDO::FETCH_OBJ);\n $user_id = $row->user_id;\n $resultats->closeCursor();\n\n return $user_id;\n}", "public function get_user_id();", "function get_user_by_email($email)\n {\n }", "function get_user_id_from_email($email)\n\t{\n\t\t//$this->firephp->log(\"email=\".$email);\n\t\t\n\t\t$this->db->select($this->flexi_auth->db_column('user_acc', 'id'));\t\n\t\t$this->db->where($this->flexi_auth->db_column('user_acc', 'email'),$email);\t\n\t\t$qres=$this->db->get('user_accounts');\n\t\tif ($qres->num_rows() > 0) {\n\t\t\t$row=$qres->row_array();\n\t\t\t//$this->firephp->log($row['uacc_id'].\"for email=\".$email);\n\t\t\treturn $row['uacc_id'];\n\t\t} else {\n\t\t\t$this->firephp->log(\"Could not determine user id from user email\");\n\t\t\treturn NULL;\n\t\t}\n\t}", "function admin_fetch_user_Idn($email)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email\t=\tsanitize($email);\n\n\t\t$query = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email'\";\n\t\t$run_query = mysqli_query($Oau_auth, $query);\n\t\t$rows = mysqli_fetch_assoc($run_query);\n\t\t$admin_Idn = $rows['admin_Idn'];\n\t\treturn $admin_Idn;\n\n\t}", "public function getUserId() {\n $response = $this->execute(array('method' => 'flickr.auth.checkToken'), 60);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['auth']['user']['nsid'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n }", "public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }", "static function email2id($email) {\n // converts a user email to the id of the user\n // both id and email are indivitual to every user\n \n global $con;\n\n $sql = \"SELECT `id` FROM `user` WHERE `email` LIKE '\".$email.\"';\";\n $query = mysqli_query($con, $sql);\n while ($row = mysqli_fetch_assoc($query)) {\n return intval($row['id']);\n }\n return NULL;\n }", "function salesperson_select_id($email)\n{\n $conn = db_connect();\n\n // Prepared statement for selecting a salesperson's information from the database\n $salesperson_select_id_stmt = pg_prepare($conn, \"salesperson_select_id_stmt\", \"SELECT * FROM salespeople WHERE email_address = $1\");\n $id = pg_fetch_result(pg_execute($conn, \"salesperson_select_id_stmt\", array($email)), 0, \"id\");\n\n return $id;\n}" ]
[ "0.7204528", "0.7062429", "0.69925815", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6983918", "0.6721962", "0.660183", "0.6551202", "0.654427", "0.6544029", "0.64955866", "0.649543", "0.6440766", "0.6430117", "0.64235926", "0.6420687", "0.6400215", "0.63867235", "0.6386022", "0.6383245" ]
0.7120048
1
Get a list of public photos for the given user.
function people_getPublicPhotos ($user_id, $per_page = 25, $page = 1, $safe_search = 1, $extras = NULL) { $params = array(); $params['method'] = 'flickr.people.getPublicPhotos'; $params['user_id'] = $user_id; $params['per_page'] = $per_page; $params['page'] = $page; $params['safe_search'] = $safe_search; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotoPublications($user)\n {\n return $this->getByCategoryType('Photo', $user);\n }", "public static function get_photos_by_user($user_id) {\n\t\t$photos_array = array();\n\n\t\t$sql = \"SELECT * \n\t\t FROM photo_directory \n\t\t WHERE user_id = {$user_id}\n\t\t ORDER BY time_uploaded DESC;\";\n\t\t$photos_dbo = mysql_query($sql);\n\t\twhile ($row = mysql_fetch_assoc($photos_dbo)) {\n\t\t\tarray_push($photos_array, $row);\n\t\t} \n\n\t\tglobal $firephp;\n\t\t$firephp->log('get_photos_by_user:');\n\t\t$firephp->log($photos_array);\n\t\treturn $photos_array;\n\t}", "function photos_getContactsPublicPhotos ($user_id, $count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getContactsPublicPhotos';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['count'] = $count;\n\t\tif ($just_friends) $params['just_friends'] = $just_friends;\n\t\tif ($single_photo) $params['single_photo'] = $single_photo;\n\t\tif ($include_self) $params['include_self'] = $include_self;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function favorites_getPublicList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$user_id = ($user_id) ? $user_id : $this->getUserId();\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getPublicList';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function find_public_photos($ids_of_private_photos, $ids_of_all_users_photos_on_page)\n{\n $public_photos = [];\n\n foreach ($ids_of_all_users_photos_on_page as $photo_id)\n if (!in_array($photo_id, $ids_of_private_photos))\n array_push($public_photos, $photo_id);\n\n return $public_photos;\n}", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\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 create_by_user_public($a_user_id){\n\n\t\t$request = self::_get_connection()->select(\"SELECT ID from `apine_images` where user_id=$a_user_id OR privacy=2\");\n\t\t$liste = new Liste();\n\t\tif($request != null && count($request) > 0){\n\t\t\tforeach($request as $item){\n\t\t\t\t$liste->add_item(new ApineImage($item['ID']));\n\t\t\t}\n\t\t}\n\t\treturn $liste;\n\t\n\t}", "public function getAllPublications($user)\n {\n return $this->getByUser($user);\n }", "function get_user_images($user_id) {\n $images = DAO_user::DAO_fetch_user_images($user_id);\n if (is_array($images)) {\n $i = 0;\n $result = array();\n foreach ($images as $image) {\n $result[$i++] = $image;\n }\n return $result;\n }\n else return -1;\n }", "public function getPhotos();", "public function getAllAvatarsByUser()\n {\n $userId = Auth::user()->id;\n $avatar = Avatar::select('image_url', 'id')->where('user_id', $userId)->get();\n return $avatar;\n }", "public function getPhotos($userid)\n {\n $stmt = $this->con->prepare(\"SELECT id_foto, caminho, disciplina, dataCreate FROM tbl_foto WHERE fk_usuario = ?\");\n $stmt->bind_param(\"i\", $userid);\n $stmt->execute();\n $stmt->bind_result($id, $caminho, $disciplina, $data);\n $photos = array();\n\n while ($stmt->fetch()) {\n $photo = array();\n $photo['id'] = $id;\n $photo['caminho'] = $caminho;\n $photo['disciplina'] = $disciplina;\n $photo['userid'] = $userid;\n $photo['data'] = $data;\n array_push($photos, $photo);\n }\n\n $stmt->close();\n return $photos;\n }", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "public function index(User $user)\n {\n $publications = $user->publications->fresh('images', 'conditions', 'categories');\n\n $aux = $publications->sortByDesc('created_at');\n\n return $this->showAll($aux);\n }", "function getUserPhotos ($dir, $userName = '') {\r\n $filesArray = getFilesFromDir($dir);\r\n $outputPhotoBook = '';\r\n foreach ($filesArray as $fileName) {\r\n $outputPhotoBook .= '<div><img src=\"img/' . $userName . '/' . $fileName. '\"></div>';\r\n }\r\n return $outputPhotoBook;\r\n}", "function getPhotosOfUser($idUser){\r\n\t\t$connectService = new ConnectionBDD();\r\n\t\t$connect = $connectService->connect();\r\n\t\t$tab = new Data();\r\n\t\t$r = mysql_query(\"select login from Utilisateur where id_user = \" . $idUser);\r\n\r\n\t\tif(mysql_num_rows($r) == 0){\r\n\t\t\treturn $tab;\r\n\t\t}\r\n\t\t$name = mysql_result($r,0,0);\r\n\t\t$connectService->close();\r\n\t\tif(!is_dir(\"../v2.0/espace/\" . $name . \"/photos/sd\")){\r\n\t\t\treturn $tab;\r\n\t\t}\r\n\r\n\t\t$tab->addInfo(\"root\",\"../v2.0/espace/\" . $name . \"/photos\");\r\n\t\t$tab->addInfo(\"photos\",$this->getPhotosOfDir($tab->getInfo(\"root\")));\r\n\t\t$tab->addInfo(\"type\",\"scan\");\r\n\r\n\t\treturn $tab;\r\n\t}", "function &getImages( $user, $category = false )\r\n {\r\n return eZImageCategory::images( \"time\", 0, -1, $category );\r\n }", "public function getAllPhotos();", "public static function print_photos_by_user($user_id) {\n\t\t$photos_array = self::get_photos_by_user($user_id);\n\t\tforeach ($photos_array as $photo) {\n\t\t\techo '\n\t\t\t\t<div class=\"photo\">\n\t\t\t\t\t<a href=\"photobooth.php?photo_id=' . $photo['photo_id'] . '\" class=\"fancybox.ajax fancybox\" rel=\"profile-gallery\">\n\t\t\t\t\t\t<div class=\"imgContainer\">\n\t\t\t\t\t\t\t<img class=\"imgImg\" src=\"../../photos-thumbnails/' . Photo::get_photo_path($photo['photo_id']) . '\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</a>\n\t\t\t\t</div>';\n\t\t}\n\t}", "public static function get_image($user_id);", "public function getUserProfilePhotos(int $user_id, int $offset = 0, int $limit = 100)\n {\n return current($this->sendRequest('GET', 'getUserProfilePhotos', [\n 'user_id' => $user_id\n ]));\n }", "function photosets_getList ($user_id = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photosets']['photoset'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getGalleryImages()\n {\n $user_id = Auth::user()->user_id;\n\n $images = Azure::getImageThumbnailFiles($user_id);\n $imageOrder = DB::table(\"users\")\n ->select(\"gallery_order\")\n ->where(\"user_id\", $user_id)\n ->first();\n\n return array(\"success\" => true, \"data\" => array(\n \"images\" => $images,\n \"order\" => $imageOrder->gallery_order\n ));\n }", "public function getAllPhotosMember($idMember){\n $sql = 'SELECT * FROM photos WHERE memberId=? AND status=0 ORDER BY likes DESC';\n $photos = $this->executeQuery($sql, array($idMember));\n return $photos;\n }", "function favorites_getList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function PhotosPublic() {\n return $this->hasMany(Photo::class, 'user_uid', 'uid')\n ->orderBy('photos.moment', 'desc')\n ->whereRaw('datediff(now(), photos.moment) <= 10')\n ->where('status_id', 1);\n }", "public function getPhoto($userId, $size);", "private function getPersonalPhotos()\n {\n if (!isset($this->personalPhotos)) {\n $individual = $this->getIndividual();\n $immediateFamily = $this->getImmediateFamily();\n $individuals = array_merge(array($individual), $immediateFamily);\n $this->personalPhotos = $this->getCommonUtility()->getIndividualsPersonalPhotos($individuals);\n }\n \n return $this->personalPhotos;\n }", "public function getPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }" ]
[ "0.81467324", "0.7285678", "0.7243038", "0.71633863", "0.7110668", "0.6900005", "0.6805384", "0.66844726", "0.66733015", "0.66701645", "0.665343", "0.66399693", "0.6600413", "0.65600675", "0.6483653", "0.6461635", "0.64439166", "0.6395105", "0.6332279", "0.6315035", "0.6309733", "0.6302908", "0.62626445", "0.62108433", "0.61762685", "0.6172985", "0.61502725", "0.61139274", "0.61105996", "0.61009675" ]
0.80440164
1
/ Photos methods Add tags to a photo.
function photos_addTags ($photo_id, $tags) { $response = $this->execute(array('method' => 'flickr.photos.addTags', 'photo_id' => $photo_id, 'tags' => $tags)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function photos_setTags ($photo_id, $tags) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.setTags', 'photo_id' => $photo_id, 'tags' => $tags));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function add_photo($photo, $gallery) {\n\n $photo_post = array();\n $photo_post['post_title'] = $photo['title'];\n $photo_post['post_content'] = '';\n $photo_post['post_type'] = 'attachment';\n $photo_post['post_status'] = 'publish';\n $photo_post['post_author'] = $this->flickr_author;\n $photo_post['post_category'] = array($this->flickr_category, );\n $photo_post['post_mime_type'] = 'image/jpeg'; //assuming jpeg, is this ok?\n $photo_post['post_parent'] = $gallery['pageid'];\n if ($photo['url_o']) {\n $photo_post['guid'] = $photo['url_o']; //magically linking the photo\n } else {\n $photo_post['guid'] = $photo['url_m']; //for some reason url_o isnt always available\n }\n \n //$postid = wp_insert_post($photo_post);\n $postid = wp_insert_attachment($photo_post);\n /* Update metadata now */\n $this->set_metadata($postid, $photo);\n\n //now tag with mediatags\n wp_set_object_terms($postid, array($gallery['mediatag']), MEDIA_TAGS_TAXONOMY);\n\n //and we should be done. Horay!\n}", "function add_tags($tags) {\n array_merge($this->tags, $tags);\n }", "private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }", "public function addPhoto($value)\n {\n $this->photos[] = $value;\n }", "public function addTags($tags) {\n foreach ($tags as $tag) {\n Database::insert(\"post_tags\", [\n \"post_id\" => $this->getId(),\n \"tag_id\" => $tag\n ]);\n }\n }", "public function addTags($tags = array())\n {\n if (!is_array($tags)) {\n $tags = func_get_args();\n }\n foreach ($tags as $tagAttributes) {\n $this->addTag($tagAttributes);\n }\n }", "public function addTagToImage($imageID, $tagName) {\n $sql = \"INSERT INTO t_tags_included VALUES(?,?)\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"ss\", $tagName, $imageID);\n $select->execute();\n $select->close();\n }", "public function &addTag($pid, $tag_uid, $tag_text, $x, $y, array $tags, $uid = 0)\n {\n // Requires either a owner_uid or a session_key\n if (empty($uid) && !$this->_facebook->auth->getSessionKey()) {\n throw new Horde_Service_Facebook_Exception(\n 'photos.addTag requires either a uid or a session_key',\n Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);\n }\n\n $params = array(\n 'pid' => $pid,\n 'tag_uid' => $tag_uid,\n 'tag_text' => $tag_text,\n 'x' => $x,\n 'y' => $y,\n 'tags' => (is_array($tags)) ? json_encode($tags) : null);\n\n if (!empty($owner_uid)) {\n $params['owner_uid'] = $uid;\n }\n $results = $this->_facebook->callMethod('facebook.photos.addTag', $params);\n\n return $results;\n\n }", "function setTags($photo_id = false){\n\n\t\t/* Lets get some tags */\n\t\tif($photo_id){\n\n\t\t\t/* This is used on Photo Page */\n\t\t\t$tags = $this->getTags($photo_id);\n\n\t\t\t/* Start Output */\n\t\t\t$output = '';\n\t\t\tforeach($tags->photo->tags->tag as $tag){\n\t\t\t\t$output .= $tag->raw.', ';\n\t\t\t}\n\t\t} else {\n\t\t\t/* This is used on photo page */\n\t\t\t$tags = $this->getUserTags();\n\n\t\t\t/* Start Output */\n\t\t\t$output = '';\n\t\t\tforeach($tags->who->tags->tag as $tag){\n\t\t\t\t$output .= $tag->_content.', ';\n\t\t\t}\n\t\t}\n\n\t\t/* Sets global var */\n\t\t$this->tags = $output;\n\t\treturn $output;\n\t}", "static function addTag($tags){\n\t\t//fetch corresponding tagids\n\t\t$length = count($tags);\n\t\t$db = (new Database)->connectToDatabase();\n\t\tfor($i=0;$i<$length;$i++){\n\t\t\t$db->query(\"SELECT * FROM tag_table WHERE tag_name='$tags[i]'\");\n\t\t\tif($db->returned_rows==0){\n\t\t\t\t//no tag found in tag table... so add it\n\t\t\t\t$db->query(\"INSERT INTO tag_table (tag_name) VALUES ('$tag[i]')\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//check if tag already there with post?\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t\n\t}", "public function addTag( $data = array() ) { \t\n\n $url = $this->_base_url . 'tags';\n $options['data']['tag'] = $data;\n $options['post'] = true;\n $this->_callAPI($url, $options);\n }", "public function addTag($imageId, $tag) {\n $dataToInsert = [\n 'image_id' => $imageId,\n 'tag' => filter_var($tag, FILTER_SANITIZE_STRING)\n ];\n $result = Db::insert('tags', $dataToInsert);\n\n return $result;\n }", "public function addTagsFor($objectid, $tags) {\n $query = 'INSERT INTO '\n . $this->tagMapTable\n . ' (objectid, tagid)'\n . ' SELECT '.$objectid.', tags.id '\n . ' FROM ' . $this->tagTable .' tags '\n . ' WHERE tags.name IN ' . $this->_createSetOfStrings($tags);\n\n $this->query($query);\n }", "function add_tag($tag) {\n array_push($this->tags, $tag);\n }", "public function setTags(Collection $tags)\n {\n throw new \\RuntimeException('Settings tags on an ImageVariant is not supported.', 1371237597);\n }", "public function tags();", "public function photos() {\n\t\treturn $this->belongsToMany('\\App\\Models\\Photo', 'tagsphotos', 'id_tag', 'id_photo');\n\t}", "public function addPhotoAction(){\n $data = $this->getRequestData();\n $types = array('activity', 'operation', 'people');\n if(isset($data['photo']['name']) && isset($data['photo']['content']) && isset($data['type']) && in_array($data['type'], $types)){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $folder = Asset_Folder::getByPath('/images/'.$data['type'].'/'.$user->getKey().'-'.$data['type']);\n if (!$folder) {\n switch($data['type']){\n case 'activity':\n $fid = 3;\n break;\n case 'operation':\n $fid = 4;\n break;\n case 'people':\n $fid = 7;\n break;\n }\n $folder = new Object_Folder();\n $folder->setKey($user->getKey() . \"-\" . $data['type']);\n $folder->setParentId($fid);\n $folder->save();\n }\n\n $asset = new Asset_Image();\n $asset->setCreationDate(time());\n $asset->setUserOwner(1);\n $asset->setUserModification(1);\n $asset->setParentId($folder->getId());\n $asset->setFilename(Pimcore_File::getValidFilename($data['name'] . \"-\" . time()));\n $asset->setData(base64_decode($data['content']));\n if(!$asset->save()){\n $this->setErrorResponse('cannot save photo!');\n }\n } else {\n $this->setErrorResponse('photo and type is mandatory for this request!');\n }\n\n $this->_helper->json(array('photo' => $asset->getId()));\n }", "private function addProductPhotos(array $request){\n\n if(array_key_exists('photos', $request)){\n \n foreach($request['photos'] as $photos){\n\n $photo = new Photo();\n\n $photoProduct = Product::where('name', $request['name'])->get();\n $path = $photos->store('/storage/products');\n $filename = basename($path);\n $extension = $photos->getClientOriginalExtension();\n \n $photo->product_id = $photoProduct[0]->id; \n $photo->path = $filename;\n $photo->extension = $extension;\n\n $photo->save();\n }\n }\n }", "function photosets_addPhoto ($photoset_id, $photo_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photosets.addPhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "abstract public function addItems(\\Media\\Entity\\Photo\\PhotoBase $item);", "public function addTags(array $tags) {\n foreach ($tags as $tag)\n $this->addTag($tag);\n }", "public function addTag(Tag $tag)\n {\n throw new \\RuntimeException('Adding a tag on an ImageVariant is not supported.', 1371237593);\n }", "public function store(Request $request)\n {\n $photo =\"\";\n if ($request->hasFile('photo')) \n {\n $photo = $request->photo->store('images');\n }\n \n $requestData = array_merge($request->all(), ['user_id' => Auth::user()->id,'photo'=>$photo]);\n\n if ( $post=Post::create($requestData)) {\n foreach ($request->post('tags') as $mytag) {\n \n $tag =new postesTags();\n $tag->post_id = $post->id;\n $tag->tag_id = $mytag;\n $tag->save();\n }\n \n }\n\n\n return redirect(url(Config::get('constants.ADMIN_PATH').'posts'))->with('flash_message', 'Post added!');\n }", "public function add_agiletags($email, $tags) {\r\n $fields = array(\r\n 'email' => urlencode($email),\r\n 'tags' => urlencode($tags)\r\n );\r\n $fields_string = '';\r\n foreach ($fields as $key => $value) {\r\n $fields_string .= $key . '=' . $value . '&';\r\n }\r\n\r\n $result = $this->curl_wrap(\"contacts/email/tags/add\", rtrim($fields_string, '&'), \"POST\", \"application/x-www-form-urlencoded\");\r\n return $result;\r\n }", "public function photos()\n {\n return $this->morphedByMany(Photo::class, 'taggable');\n }", "protected function createNewTag($tags, $relation)\n {\n if($tags) {\n foreach( $tags as $val) {\n $tag = $this->tag->create([ 'nama' => $val ]);\n $relation->tag()->attach($tag);\n }\n }\n }", "public function addPhoto($paramsPhoto)\n {\n return DB::table('photos')->insert(\n [\n 'photos_link' => trim(strip_tags($paramsPhoto['link'])),\n 'album_id' => trim(strip_tags($paramsPhoto['albumId'])),\n ]\n ); }", "public function setPhotos($value)\n {\n $this->photos = $value;\n }" ]
[ "0.6724628", "0.64815724", "0.6448946", "0.644029", "0.61712533", "0.6033899", "0.5994737", "0.59491086", "0.591882", "0.58828974", "0.58600646", "0.5808063", "0.5772397", "0.57443684", "0.57409966", "0.57406014", "0.5707457", "0.57072794", "0.56968343", "0.5681233", "0.5637215", "0.5618421", "0.5593804", "0.5551292", "0.55217636", "0.5505209", "0.55000836", "0.5491844", "0.5491801", "0.54901016" ]
0.7340523
0
Delete a photo from flickr.
function photos_delete ($photo_id) { $response = $this->execute(array('method' => 'flickr.photos.delete', 'photo_id' => $photo_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_photo(){\n $sql=\"DELETE FROM photos WHERE id=\".$this->id;\n self::$connect->query($sql);\n\n }", "public function delete_photo ($photo_id){\n\t\t$q_extension = \"SELECT extension FROM photos WHERE photo_id =\".$photo_id;\t\n\t\t$q_photo = 'WHERE photo_id = '.$photo_id;\n\t\t#delete photo record from database\n\t\t\t\n\t\t$ext = DB::instance(DB_NAME)->select_field($q_extension);\n\t\tDB::instance(DB_NAME)->delete('photos', $q_photo);\t\t\n\t\t//delete photo from uploads images folder\n\t\tunlink(\"uploads/images/\".$photo_id.\".\".$ext);\n\t\t#send user back to message index\n\t\tRouter::redirect(\"/photos/gallery\");\n\t\n\t}", "private function deletePhoto()\n {\n try \n {\n global $cbphoto;\n \n $request = $_REQUEST;\n \n if(!isset($request['photo_id']) || $request['photo_id']==\"\" )\n throw_error_msg(\"photo id not provided\");\n\n if( !is_numeric($request['photo_id']) )\n throw_error_msg(\"invalid photo id\");\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\")); \n\n $id = (int)$request['photo_id'];\n $photo = $cbphoto->get_photo($id);\n\n if(!$photo)\n {\n throw_error_msg(lang(\"photo_not_exists\"));\n }\n else\n {\n if($photo['userid']!=userid())\n throw_error_msg(\"You don't have enough permission to delete this photo\");\n } \n \n $cbphoto->delete_photo($id); \n \n if( error() )\n {\n if(error('single')!=\"Photo does not exist in this collection\")\n {\n throw_error_msg(error('single')); \n } \n else\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"photo deleted successfully\", \"data\" => array());\n $this->response($this->json($data)); \n } \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"photo deleted successfully\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n } \n }", "public static function delete_photo($id){\n global $db;\n $row = static::find_photo($id);\n $k78sql = \"DELETE FROM photos WHERE photo_id = '\".$id.\"'\";\n try {\n //check if photo is present in database\n if($db->query($sql)){\n //$row = static::find_photo($id);\n //deletes file in image path\n unlink(IMG_PATH.DS.$row['file_name']);\n //deleting photo from database table\n $db->exec($sql);\n return 'Photo with ID '.$id.' deleted from DB';\n }else{\n throw new Exception(\"File could not be deleteed\");\n }\n } catch (Exception $e) {\n return $e;\n }\n }", "function photo_remove() {\n if ( ! $this->input->is_ajax_request() || ! $this->auth->is_login()) {\n return redirect(config_item('site_url'));\n }\n \n $item = filter($this->uri->segment(3), 'str', 40);\n $photo = $this->media->get_by_id($item);\n \n if ( ! $photo || empty($photo)) {\n log_write(LOG_WARNING, 'Photo not found, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n \n if ($photo->item_author != $this->auth->get_user_id()) {\n log_write(LOG_ERR, 'User is not the author of the photo, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n\n $image = explode('.', $photo->item_filename);\n\n unlink(FCPATH . '/uploads/' . $photo->item_point . '/' . $image[0] . '_thumb.' . $image[1]);\n unlink(FCPATH . '/uploads/' . $photo->item_point . '/' . $image[0] . '.' . $image[1]);\n\n $this->media->remove($item);\n \n return $this->output->set_output(json_encode(array(\n 'code' => 'luck'\n )));\n }", "public function removeAction() {\r\n if (empty($_POST['photo_id']))\r\n die('error');\r\n //GET PHOTO ID AND ITEM\r\n $photo_id = (int) $this->_getParam('photo_id');\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n $db = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n $photo->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "public function deletePhoto($id)\n {\n return DB::table('photos')->where(['photos_id' => $id])->delete();\n }", "public function destroy_photo($id)\n {\n //\n if(File::exists(public_path('files/products_img/'.Photo::find($id)->name)))\n {\n File::delete(public_path('files/products_img/'.Photo::find($id)->name));\n Photo::find($id)->delete();\n return redirect()->back();\n }\n }", "function _delete_photo($file){\n\t\t@unlink('web/upload/'.image_small($file));\n\t\t@unlink('web/upload/'.image_large($file));\n\t}", "public static function deleteImage(){}", "public function removePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id');\n\n //GET LISTING ITEM\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n //GET FILE ID\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n //DELETE PHOTO\n if (!empty($file_id)) {\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n $photo->delete();\n }\n\n //SET PHOTO ID TO ZERO\n $sitereview->photo_id = 0;\n $sitereview->save();\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function delete($id) \n\t{\n \t$tot = $this->Model_photo->photo_check($id);\n \tif(!$tot) {\n \t\tredirect(base_url().'admin/photo');\n \texit;\n \t}\n\n $data['photo'] = $this->Model_photo->getData($id);\n if($data['photo']) {\n unlink('./public/uploads/'.$data['photo']['photo_name']);\n }\n\n $this->Model_photo->delete($id);\n redirect(base_url().'admin/photo');\n }", "public function DeletePhotos()\n\t{\tforeach ($this->imagesizes as $sizename=>$size)\n\t\t{\t@unlink($this->GetImageFile($sizename));\n\t\t}\n\t}", "function delete () {\n $this->clearCache ();\n commentaire::deletePhoto ($this->dir, $this->file);\n return files::deleteFile (luxbum::getFsPath ($this->dir) . $this->file);\n }", "public function deleteImage($foto) {\n \t\n \tforeach($this->barcoFotos as $barcof) {\n \t\tif ($barcof->id === $foto) {\n \t\t\t$image = $barcof->foto_url;\n \t\t\tif (unlink($image)) {\n \t\t\t\t$barcof->delete();\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t}\n \treturn false;\n }", "public function destroy($id)\n {\n $photo = $this->photo->find($id);\n $path = public_path() . '/' . Config::get('photogallery::upload_folder');\n if (File::exists($path . $photo->url))\n File::delete($path . $photo->url);\n $photo->delete();\n\n /*\n * if exist in the configuration file, delete all other versions\n */\n if (count(Config::get('photogallery::versions')) > 0) {\n foreach (Config::get('photogallery::versions') as $version) {\n $path = public_path() . '/' . $version['upload_folder'];\n if (File::exists($path . $photo->url))\n File::delete($path . $photo->url);\n $photo->delete();\n }\n }\n\n return Redirect::back();\n }", "public function destroy(Photo $photo)\n {\n $photo->delete();\n return redirect('recitals/photos');\n }", "public function destroy(Photo $photo)\n {\n //\n }", "public function destroy(Photo $photo)\n {\n //\n }", "public function deletePicture($id){\n $picName = null;\n $images = new Images();\n $dataPic = $images->get_image($id);\n foreach ($dataPic as $key => $value) {\n $picName = $value->img_url;\n }\n $checkFile = file_exists(public_path() . '/' . $picName);\n if ($checkFile){\n unlink(public_path() . '/' . $picName);\n }\n }", "function deletePhoto($imageNom, $link)\n{\n /* SUPPRIME DU SERVEUR */\n unlink($imageNom);\n\n /* SUPPRIME DE LA BASE DE DONNEES */\n $query = \"DELETE FROM Photo WHERE nomFich = '\" . $imageNom . \"'\";\n executeUpdate($link, $query);\n\n $imageNom = str_replace(array( '..', '/', '\\\\', ':' ), '', $imageNom);\n}", "public function deleteAction()\n {\n \t$this->_helper->getHelper('ViewRenderer')->setNoRender(true);\n \t\n \t// Récuperation de l'ID photo\n\t\t$id = (is_numeric($this->_getParam('id'))) ? $this->_getParam('id') : 0;\n\t\t\n\t\t// Récuperation de la photo\n\t\t$photoMapper = new Application_Model_PhotoMapper();\n\t\t$photo = $photoMapper->getPhoto($id);\n\t\t\n\t\tif(!is_null($photo))\n\t\t{\n\t\t\t// Suppression de la photo\n\t\t\t$rowsDeleted = $photoMapper->deletePhoto($id);\n\t\t\n\t\t\t// Message\n\t\t\t$message = $rowsDeleted.' photo supprimée';\n\t\t\t$this->_helper->getHelper('FlashMessenger')->addMessage($message);\n\t\t\t\n\t\t\t// Redirection\n\t\t\t$this->_helper->getHelper('Redirector')->gotoSimple('edit', 'project', 'admin', array('id' => $photo->getIdProjet()));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_helper->getHelper('Redirector')->gotoSimple('list', 'project', 'admin');\n\t\t}\n }", "public function actionDelete()\n {\n if (Yii::app()->getRequest()->getIsPostRequest()) {\n $id = $_POST['id'];\n /** @var $photo GalleryPhoto */\n $photo = GalleryPhoto::model()->findByPk($id);\n if ($photo !== null && $photo->delete()) echo 'OK';\n else echo 'FAIL';\n } else echo 'FAIL';\n }", "public function destroy(Fotos $fotos)\n {\n //\n }", "public function deletePhoto (Request $request) {\n\n \ttry {\n\n \t\t$this->profileRepo->deletePhoto(Auth::user()->id, $request->photo_name);\n \t\treturn response()->json(['status' => 'success']);\n\n\n \t} catch (\\Exception $e) {\n\n \t\treturn response()->json(['status' => 'error', 'errors' => [trans_choice('app.unable_to_delete',1)] ]);\n \t}\n }", "public function deletePhoto(Request $request) {\n\n // Log::info(\"request image delete \" . $request['image']);\n\n if(is_null($request->image) || is_null($request->id)) {\n return response()-json([\"error\" => \"No Image Specified\"], 200);\n }\n\n $photo = Photo::where([ \n [\"property_id\", $request->id],\n [\"url\", $request->image]\n ]);\n\n if(!is_null($photo)) {\n $photo->delete();\n }\n\n Storage::disk('public')->delete($request->image);\n\n return response()->json([\"success\" => \"success\"], 200);\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n\n unlink(public_path() . $photo->file);\n\n $photo->delete();\n\n Session::flash('message', 'Photo deleted!');\n Session::flash('status', 'success');\n\n return redirect('admin/photos');\n }", "public function destroyPhoto($id) {\n\n // Find the ID of the photo and delete it.\n ProfilePhoto::findOrFail($id)->delete();\n\n return redirect()->back();\n\n }", "public function deleting( Picture $picture)\n\t{\n\t\tif (!empty($picture->filename)) {\n\t\t\t$filename = public_path($picture->getPathImage());\n\t\t\t\\File::Delete($filename);\n\t\t\t$filename = public_path($picture->getPathThumbImage());\n\t\t\t\\File::Delete($filename);\n\t\t}\n\t}" ]
[ "0.75842", "0.7137276", "0.6974389", "0.695486", "0.6946395", "0.69385713", "0.6874482", "0.6823608", "0.6817173", "0.67936695", "0.6791227", "0.67703795", "0.6729899", "0.66948974", "0.6677093", "0.6649489", "0.66435516", "0.6637135", "0.6637135", "0.66153735", "0.6613823", "0.6602847", "0.66016155", "0.6592587", "0.6592215", "0.65895665", "0.6550014", "0.65430456", "0.65080506", "0.6505327" ]
0.759642
0
Fetch a list of recent photos from the calling users' contacts.
function photos_getContactsPhotos ($count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.getContactsPhotos'; $params['count'] = $count; if ($just_friends) $params['just_friends'] = $just_friends; if ($single_photo) $params['single_photo'] = $single_photo; if ($include_self) $params['include_self'] = $include_self; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function photos_getContactsPublicPhotos ($user_id, $count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getContactsPublicPhotos';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['count'] = $count;\n\t\tif ($just_friends) $params['just_friends'] = $just_friends;\n\t\tif ($single_photo) $params['single_photo'] = $single_photo;\n\t\tif ($include_self) $params['include_self'] = $include_self;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function photos_getRecent ($per_page = 25, $page = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getRecent';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getTenLatestPhotos();", "public function fetchRecentImages()\n {\n $posts = $this->_hc->get_rooms_history('517400','recent');\n $posts = array_reverse($posts);\n\n $images = array();\n foreach ($posts as $post) {\n $url = Image::parseImageUrl($post->message);\n if ($url !== null) {\n $images[] = array(\n 'url' => $url,\n 'date' => $post->date\n );\n }\n }\n\n return $images;\n }", "function getRecentPhoto()\n\t{\n\t\t$limit = $this->input->post('limit');\n\t\t$page = $this->input->post('page');\n\t\t$response = $this->mapi->getRecentPhoto($limit,$page);\n\n\t\techo json_encode($response);\n\t}", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function getPhotos();", "public function getPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function getAllPhotos();", "public function getUserProfilePhotos($datas = [])\r\n {\r\n return $this->telegram(\"getUserProfilePhotos\", $datas);\r\n }", "private function getPictures( $count ){\n\t\t$flickr_group_id = Yii::$app->params['flickr-group-id'];\n\t\t$flickr_api_key = Yii::$app->params['flickr-api-key'];\n\n\t\t$flickr_url = 'https://api.flickr.com/services/rest/?method=flickr.groups.pools.getPhotos&api_key=' . urlencode( $flickr_api_key ) . '&group_id=' . urlencode($flickr_group_id) . '&per_page=' . urlencode($count) . '&format=json&nojsoncallback=1&extras=url_q';\n\t\t$json_array = $this->getFromApi( $flickr_url );\n\n\t\tif( isset($json_array['photos']) && isset($json_array['photos']['photo']) ){\n\t\t\tif( isset($_GET['debug']) ){\n\t\t\t\tvar_dump($json_array['photos']['photo']);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\treturn $json_array['photos']['photo'];\n\t\t}\n\n\t\treturn array();\n\t}", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "public function getAjaxPhotos() {\n // define the fb page id\n $facebook_page_id = sfConfig::get('app_facebook_page_id');\n\n // fetch the photos\n $photos = $this->facebook->api('/' . $facebook_page_id . '/photos');\n\n // return JSON encoded list of photos\n $this->renderText(json_encode($photos));\n }", "function photos_recentlyUpdated ($per_page = 25, $page = 1, $min_date = NULL, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.recentlyUpdated';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif (!$min_date) {\n\t\t\t$params['min_date'] = time()-604800;;\n\t\t}\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function getUserContacts()\n\t{\n\t\t$parameters = array( 'page' => 1 );\n\t\t$response = $this->api->get( 'user/list_friends.json', $parameters );\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User contacts request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t}\n\n\t\tif( ! $response || ! count( $response->friends ) ){\n\t\t\treturn ARRAY();\n\t\t}\n\n\t\t$max_page = (property_exists($response,'max_page'))?$response->max_page:1;\n\t\tfor ($i = 0; $i<$max_page; $i++) {\n\t\t\tif( $i > 0 ) {\n\t\t\t\t$parameters = array( 'page' => $i );\n\t\t\t\t$response = $this->api->get( 'user/list_friends.json', $parameters );\n\t\t\t\t// check the last HTTP status code returned\n\t\t\t\tif ( $this->api->http_code != 200 ){\n\t\t\t\t\tthrow new Exception( \"User contacts request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $response && count( $response->friends ) ){\n\t\t\t\tforeach( $response->friends as $item ){\n\t\t\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t\t\t$uc->identifier = (property_exists($item,'id_user'))?$item->id_user:\"\";\n\t\t\t\t\t$uc->displayName = (property_exists($item,'username'))?$item->username:\"\";\n\t\t\t\t\t$uc->profileURL = (property_exists($item,'user_url'))?$item->user_url:\"\";\n\t\t\t\t\t$uc->photoURL = (property_exists($item,'avatar_url'))?$item->avatar_url:\"\";\n\t\t\t\t\t//$uc->description = (property_exists($item,'description'))?$item->description:\"\";\n\n\t\t\t\t\t$contacts[] = $uc;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $contacts;\n\t}", "function photos_getWithGeoData ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getWithGeoData';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($min_upload_date) $params['min_upload_date'] = $min_upload_date;\n\t\tif ($max_upload_date) $params['max_upload_date'] = $max_upload_date;\n\t\tif ($min_taken_date) $params['min_taken_date'] = $min_taken_date;\n\t\tif ($max_taken_date) $params['max_taken_date'] = $max_taken_date;\n\t\tif ($privacy_filter) $params['privacy_filter'] = $privacy_filter;\n\t\tif ($media) $params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\tif ($sort) $params['sort'] = $sort;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "private function getPersonalPhotos()\n {\n if (!isset($this->personalPhotos)) {\n $individual = $this->getIndividual();\n $immediateFamily = $this->getImmediateFamily();\n $individuals = array_merge(array($individual), $immediateFamily);\n $this->personalPhotos = $this->getCommonUtility()->getIndividualsPersonalPhotos($individuals);\n }\n \n return $this->personalPhotos;\n }", "public function getPhotos($album_uid) {\r\n\t\t$photos = tx_cwtcommunity_lib_common::dbQuery('SELECT * FROM tx_cwtcommunity_photos p WHERE album_uid = \"'.intval($album_uid).'\" AND NOT deleted = \"1\" AND NOT hidden = 1 ORDER BY crdate ASC;');\r\n\t\treturn $photos;\r\n\t}", "public function getphotos(){\n\t\ttry{\n\t\t\t$user_id = DB::table('mobiletokens')->where('token', Input::get('token'))->pluck('user_id');\n\t\t\t//$id = DB::select('select user_id from mobiletokens where token = ?', array(Input::get('token')));\n\t\t\t//$links = DB::table('photos')->select('link'/*,'description','latitude','longitude','created_at'*/)->where('user_id','=',$id)->get();\n\t\t\t$links = DB::table('photos')->select('link')->where('user_id','=',$user_id)->orderBy('created_at','desc')->get();\n\t\t} catch (Exception $e){\n\t\t\treturn Response::json(['status' => 'failed']);\n\t\t}\n\t\treturn Response::json(['status' => 'success', 'links' => $links]);\n\t}", "public function getPhotos()\n {\n return $this->photos;\n }", "public function getPhotos()\n {\n try {\n if (!$this->profileUrl) {\n throw new Exception(\"The profile url is empty.\", self::ERROR_PROFILE_URL_EMPTY);\n }\n $html = $this->getHtmlProfile();\n $photoList = $this->getPhotoList($html);\n } catch (Exception $e) {\n $photoList = array();\n $this->errorCode = $e->getCode();\n $this->errorMessage = $e->getMessage();\n }\n\n return $photoList;\n }", "function photos_getWithoutGeoData ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getWithoutGeoData';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($min_upload_date) $params['min_upload_date'] = $min_upload_date;\n\t\tif ($max_upload_date) $params['max_upload_date'] = $max_upload_date;\n\t\tif ($min_taken_date) $params['min_taken_date'] = $min_taken_date;\n\t\tif ($max_taken_date) $params['max_taken_date'] = $max_taken_date;\n\t\tif ($privacy_filter) $params['privacy_filter'] = $privacy_filter;\n\t\tif ($media) $params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\tif ($sort) $params['sort'] = $sort;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function index()\n {\n //\n $id = Auth()->user()->id;\n $photos = Picture::where('user_id', '=', $id )->latest()->get();\n\n $result = $photos->map(function($photo){\n return [\n \"user_id\" => $photo->user_id,\n \"title\" => $photo->title,\n \"photos\" => $photo->photos\n ];\n });\n\n return response()->json([\n \"status\" => \"success\",\n \"status_code\" => StatusCodes::SUCCESS,\n \"message\" => \"Records fetched successfully\",\n \"data\" => $result\n ],StatusCodes::SUCCESS);\n }", "public function getAllPhotosMember($idMember){\n $sql = 'SELECT * FROM photos WHERE memberId=? AND status=0 ORDER BY likes DESC';\n $photos = $this->executeQuery($sql, array($idMember));\n return $photos;\n }", "public function getAllAvatarsByUser()\n {\n $userId = Auth::user()->id;\n $avatar = Avatar::select('image_url', 'id')->where('user_id', $userId)->get();\n return $avatar;\n }", "function getUserContacts()\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\n\t\t$parameters = array();\n\t\t$parameters['format']\t= 'json';\n\t\t$parameters['count'] = 'max';\n\t\t\n\t\t$response = $this->api->get('user/' . $userId . '/contacts', $parameters);\n\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( 'User contacts request failed! ' . $this->providerId . ' returned an error: ' . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t}\n\n\t\tif ( !$response->contacts->contact && ( $response->errcode != 0 ) )\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$contacts = array();\n\n\t\tforeach( $response->contacts->contact as $item ) {\n\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t$uc->identifier = $this->selectGUID( $item );\n\t\t\t$uc->email = $this->selectEmail( $item->fields );\n\t\t\t$uc->displayName = $this->selectName( $item->fields );\n\t\t\t$uc->photoURL = $this->selectPhoto( $item->fields );\n\n\t\t\t$contacts[] = $uc;\n\t\t}\n\t\t\n\t\treturn $contacts;\n\t}", "public function getPhotos()\n {\n return $this->hasMany(Photo::className(), ['owner_id' => 'id']);\n }", "function people_getPublicPhotos ($user_id, $per_page = 25, $page = 1, $safe_search = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.people.getPublicPhotos';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\t$params['safe_search'] = $safe_search;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function rest_get_avatar_urls($id_or_email)\n {\n }", "public function allPhotosAction() {\r\n $this->view->photo_id = $photo_id = $this->getRequest()->getParam('photo_id', '0');\r\n $this->view->chanel_id = $album_id = $this->getRequest()->getParam('chanel_id', '0');\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $params = array();\r\n // send extra params to view for extra URL parameters\r\n $this->view->params = $params;\r\n $page = isset($_POST['page']) ? $_POST['page'] : 1;\r\n $is_ajax = isset($_POST['is_ajax']) ? $_POST['is_ajax'] : 0;\r\n $params['paginator'] = true;\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n //FETCH photos\r\n $paginator = $this->view->allPhotos = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getPhotoCustom($photo, $params, '', true);\r\n $paginator->setItemCountPerPage(30);\r\n $this->view->limit = ($page - 1) * 30;\r\n $this->view->page = $page;\r\n $this->view->is_ajax = $is_ajax;\r\n $paginator->setCurrentPageNumber($page);\r\n }" ]
[ "0.68440557", "0.6666258", "0.6618044", "0.65922886", "0.65017796", "0.64848036", "0.6447779", "0.6435721", "0.64054793", "0.62770945", "0.6248473", "0.6184491", "0.6127249", "0.6055801", "0.60177565", "0.5982734", "0.59674066", "0.59271115", "0.5924531", "0.58834046", "0.58529484", "0.58066577", "0.578659", "0.57732743", "0.56949335", "0.56767607", "0.5671538", "0.5670543", "0.5638772", "0.56150264" ]
0.72992504
0
Fetch a list of recent public photos from a users' contacts.
function photos_getContactsPublicPhotos ($user_id, $count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.getContactsPublicPhotos'; $params['user_id'] = $user_id; $params['count'] = $count; if ($just_friends) $params['just_friends'] = $just_friends; if ($single_photo) $params['single_photo'] = $single_photo; if ($include_self) $params['include_self'] = $include_self; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function photos_getContactsPhotos ($count = 10, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getContactsPhotos';\n\t\t$params['count'] = $count;\n\t\tif ($just_friends) $params['just_friends'] = $just_friends;\n\t\tif ($single_photo) $params['single_photo'] = $single_photo;\n\t\tif ($include_self) $params['include_self'] = $include_self;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "function people_getPublicPhotos ($user_id, $per_page = 25, $page = 1, $safe_search = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.people.getPublicPhotos';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\t$params['safe_search'] = $safe_search;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getPhotos();", "public function getPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function getAllPhotos();", "private function getPictures( $count ){\n\t\t$flickr_group_id = Yii::$app->params['flickr-group-id'];\n\t\t$flickr_api_key = Yii::$app->params['flickr-api-key'];\n\n\t\t$flickr_url = 'https://api.flickr.com/services/rest/?method=flickr.groups.pools.getPhotos&api_key=' . urlencode( $flickr_api_key ) . '&group_id=' . urlencode($flickr_group_id) . '&per_page=' . urlencode($count) . '&format=json&nojsoncallback=1&extras=url_q';\n\t\t$json_array = $this->getFromApi( $flickr_url );\n\n\t\tif( isset($json_array['photos']) && isset($json_array['photos']['photo']) ){\n\t\t\tif( isset($_GET['debug']) ){\n\t\t\t\tvar_dump($json_array['photos']['photo']);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\treturn $json_array['photos']['photo'];\n\t\t}\n\n\t\treturn array();\n\t}", "public function getTenLatestPhotos();", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "private function getPersonalPhotos()\n {\n if (!isset($this->personalPhotos)) {\n $individual = $this->getIndividual();\n $immediateFamily = $this->getImmediateFamily();\n $individuals = array_merge(array($individual), $immediateFamily);\n $this->personalPhotos = $this->getCommonUtility()->getIndividualsPersonalPhotos($individuals);\n }\n \n return $this->personalPhotos;\n }", "public function PhotosPublic() {\n return $this->hasMany(Photo::class, 'user_uid', 'uid')\n ->orderBy('photos.moment', 'desc')\n ->whereRaw('datediff(now(), photos.moment) <= 10')\n ->where('status_id', 1);\n }", "function photos_getRecent ($per_page = 25, $page = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getRecent';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function fetchRecentImages()\n {\n $posts = $this->_hc->get_rooms_history('517400','recent');\n $posts = array_reverse($posts);\n\n $images = array();\n foreach ($posts as $post) {\n $url = Image::parseImageUrl($post->message);\n if ($url !== null) {\n $images[] = array(\n 'url' => $url,\n 'date' => $post->date\n );\n }\n }\n\n return $images;\n }", "function photos_getWithGeoData ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getWithGeoData';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($min_upload_date) $params['min_upload_date'] = $min_upload_date;\n\t\tif ($max_upload_date) $params['max_upload_date'] = $max_upload_date;\n\t\tif ($min_taken_date) $params['min_taken_date'] = $min_taken_date;\n\t\tif ($max_taken_date) $params['max_taken_date'] = $max_taken_date;\n\t\tif ($privacy_filter) $params['privacy_filter'] = $privacy_filter;\n\t\tif ($media) $params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\tif ($sort) $params['sort'] = $sort;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getAjaxPhotos() {\n // define the fb page id\n $facebook_page_id = sfConfig::get('app_facebook_page_id');\n\n // fetch the photos\n $photos = $this->facebook->api('/' . $facebook_page_id . '/photos');\n\n // return JSON encoded list of photos\n $this->renderText(json_encode($photos));\n }", "public function getUserProfilePhotos($datas = [])\r\n {\r\n return $this->telegram(\"getUserProfilePhotos\", $datas);\r\n }", "function find_public_photos($ids_of_private_photos, $ids_of_all_users_photos_on_page)\n{\n $public_photos = [];\n\n foreach ($ids_of_all_users_photos_on_page as $photo_id)\n if (!in_array($photo_id, $ids_of_private_photos))\n array_push($public_photos, $photo_id);\n\n return $public_photos;\n}", "function getRecentPhoto()\n\t{\n\t\t$limit = $this->input->post('limit');\n\t\t$page = $this->input->post('page');\n\t\t$response = $this->mapi->getRecentPhoto($limit,$page);\n\n\t\techo json_encode($response);\n\t}", "public function getPhotos($album_uid) {\r\n\t\t$photos = tx_cwtcommunity_lib_common::dbQuery('SELECT * FROM tx_cwtcommunity_photos p WHERE album_uid = \"'.intval($album_uid).'\" AND NOT deleted = \"1\" AND NOT hidden = 1 ORDER BY crdate ASC;');\r\n\t\treturn $photos;\r\n\t}", "public function getAllPhotosMember($idMember){\n $sql = 'SELECT * FROM photos WHERE memberId=? AND status=0 ORDER BY likes DESC';\n $photos = $this->executeQuery($sql, array($idMember));\n return $photos;\n }", "function photos_getWithoutGeoData ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getWithoutGeoData';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($min_upload_date) $params['min_upload_date'] = $min_upload_date;\n\t\tif ($max_upload_date) $params['max_upload_date'] = $max_upload_date;\n\t\tif ($min_taken_date) $params['min_taken_date'] = $min_taken_date;\n\t\tif ($max_taken_date) $params['max_taken_date'] = $max_taken_date;\n\t\tif ($privacy_filter) $params['privacy_filter'] = $privacy_filter;\n\t\tif ($media) $params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\tif ($sort) $params['sort'] = $sort;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function index()\n {\n //\n $id = Auth()->user()->id;\n $photos = Picture::where('user_id', '=', $id )->latest()->get();\n\n $result = $photos->map(function($photo){\n return [\n \"user_id\" => $photo->user_id,\n \"title\" => $photo->title,\n \"photos\" => $photo->photos\n ];\n });\n\n return response()->json([\n \"status\" => \"success\",\n \"status_code\" => StatusCodes::SUCCESS,\n \"message\" => \"Records fetched successfully\",\n \"data\" => $result\n ],StatusCodes::SUCCESS);\n }", "public function getphotos(){\n\t\ttry{\n\t\t\t$user_id = DB::table('mobiletokens')->where('token', Input::get('token'))->pluck('user_id');\n\t\t\t//$id = DB::select('select user_id from mobiletokens where token = ?', array(Input::get('token')));\n\t\t\t//$links = DB::table('photos')->select('link'/*,'description','latitude','longitude','created_at'*/)->where('user_id','=',$id)->get();\n\t\t\t$links = DB::table('photos')->select('link')->where('user_id','=',$user_id)->orderBy('created_at','desc')->get();\n\t\t} catch (Exception $e){\n\t\t\treturn Response::json(['status' => 'failed']);\n\t\t}\n\t\treturn Response::json(['status' => 'success', 'links' => $links]);\n\t}", "function favorites_getPublicList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$user_id = ($user_id) ? $user_id : $this->getUserId();\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getPublicList';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function findDistinctUrlPics()\n {\n return $this->createStandardQueryBuilder()->distinct('pics.url')->sort('public_date', 1)->getQuery()->execute();\n }", "public function getPhotos()\n {\n return $this->photos;\n }", "public function allPhotosAction() {\r\n $this->view->photo_id = $photo_id = $this->getRequest()->getParam('photo_id', '0');\r\n $this->view->chanel_id = $album_id = $this->getRequest()->getParam('chanel_id', '0');\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $params = array();\r\n // send extra params to view for extra URL parameters\r\n $this->view->params = $params;\r\n $page = isset($_POST['page']) ? $_POST['page'] : 1;\r\n $is_ajax = isset($_POST['is_ajax']) ? $_POST['is_ajax'] : 0;\r\n $params['paginator'] = true;\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n //FETCH photos\r\n $paginator = $this->view->allPhotos = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getPhotoCustom($photo, $params, '', true);\r\n $paginator->setItemCountPerPage(30);\r\n $this->view->limit = ($page - 1) * 30;\r\n $this->view->page = $page;\r\n $this->view->is_ajax = $is_ajax;\r\n $paginator->setCurrentPageNumber($page);\r\n }", "public function getPhotos()\n {\n try {\n if (!$this->profileUrl) {\n throw new Exception(\"The profile url is empty.\", self::ERROR_PROFILE_URL_EMPTY);\n }\n $html = $this->getHtmlProfile();\n $photoList = $this->getPhotoList($html);\n } catch (Exception $e) {\n $photoList = array();\n $this->errorCode = $e->getCode();\n $this->errorMessage = $e->getMessage();\n }\n\n return $photoList;\n }", "function company_photos()\n\t\t{\n\t\t\t$type = $this->uri->segment(5);\n\t\t\t$data = $this->photo->company_photos();\n\t\t\t$this->directPageDetails(\"gallery_company/list_photo_company\",\"\",$data);\n\t\t}", "public static function getPopularPhotos()\n {\n $c = new Criteria();\n $c->setLimit(4);\n $c->add(self::APPROVED, 1);\n $c->add(PhotoPeer::POPULAR_PHOTO, 1);\n $c->add(PhotoPeer::VISIBILITY, 0);\n $c->addDescendingOrderByColumn(PhotoPeer::RATING);\n $photos=PhotoPeer::doSelect($c); \n return $photos;\n }" ]
[ "0.7301247", "0.7199164", "0.688835", "0.6676204", "0.6649503", "0.65172833", "0.6448596", "0.64393145", "0.63865054", "0.6377215", "0.6306663", "0.6274159", "0.62488616", "0.61948913", "0.6165222", "0.61591196", "0.6140508", "0.61305773", "0.6092145", "0.6075333", "0.6031383", "0.6015164", "0.5976479", "0.59210277", "0.58918345", "0.58721024", "0.5868995", "0.5862498", "0.5846988", "0.58134186" ]
0.76549244
0
Gets a list of photo counts for the given date ranges for the calling user.
function photos_getCounts ($dates = NULL, $taken_dates = NULL) { $params = array(); $params['method'] = 'flickr.photos.getCounts'; if (!$dates) { $dates = time()-31536000 .','. time(); $params['dates'] = $dates; } if ($taken_dates) $params['taken_dates'] = $taken_dates; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photocounts']['photocount']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListUserCountByRangeDate($types, $startDate = '', $endDate = '')\r\n\t{\r\n\t\tif ( empty($types) ) {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\t$em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');\r\n\r\n\t\t$now = new \\DateTime(\"now\");\r\n\t\t// $now->format('Y-m-d') . ' 23:59:59';\r\n\t\t$startDateTime = \\DateTime::createFromFormat('d/m/Y', $startDate);\r\n\t\t$endDateTime = \\DateTime::createFromFormat('d/m/Y', $endDate);\r\n\r\n\t\t$rsm = new \\Doctrine\\ORM\\Query\\ResultSetMapping;\r\n\r\n\t\t$select = array();\r\n\t\t$i = 0;\r\n\r\n\t\tforeach($types as $type) {\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'validatedMembers':\r\n\t\t\t\t\t$filter = \"u.state IS NOT NULL\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'activeMembers':\r\n\t\t\t\t\t$filter = \"u.state=1\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'optin':\r\n\t\t\t\t\t$filter = \"u.optin=1\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'optinPartners':\r\n\t\t\t\t\t$filter = \"u.optin_partner=1\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'unregistered':\r\n\t\t\t\t\t$filter = \"u.state IS NULL\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'suspended':\r\n\t\t\t\t\t$filter = \"u.state=2\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\tcase 'members':\r\n\t\t\t\t\t$filter = \"u.user_id\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$rsm->addScalarResult('c'.$i, 'c'.$i);\r\n\t\t\t$select[] = 'SUM(CASE WHEN '.$filter.' THEN 1 ELSE 0 END) AS c'.$i;\r\n\t\t\t$rsm->addScalarResult('c'.$i.'_male', 'c'.$i.'_male');\r\n\t\t\t$select[] = 'SUM(CASE WHEN '.$filter.' AND (u.title=\\'M\\' OR u.title IS NULL) THEN 1 ELSE 0 END) AS c'.$i.'_male';\r\n\t\t\t$rsm->addScalarResult('c'.$i.'_female', 'c'.$i.'_female');\r\n\t\t\t$select[] = 'SUM(CASE WHEN '.$filter.' AND u.title=\\'Me\\' THEN 1 ELSE 0 END) AS c'.$i++.'_female';\r\n\t\t}\r\n\r\n\t\tif ($startDate != '' && $endDate != '') {\r\n\t\t\t$dateRange = \"(u.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0' AND u.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0')\";\r\n\t\t} elseif ($startDate == '' && $endDate != '') {\r\n\t\t\t$dateRange = \"u.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} elseif ($startDate != '' && $endDate == '') {\r\n\t\t\t$dateRange = \"u.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} else {\r\n\t\t\t$dateRange = \"u.created_at IS NOT NULL\";\r\n\t\t}\r\n\t\t$query = $em->createNativeQuery('\r\n\t\t\tSELECT '.implode(',',$select).' FROM user AS u\r\n\t\t\tWHERE ' . $dateRange, $rsm);\r\n\t\treturn array_values($query->getSingleResult());\r\n\t}", "public function getGamesByRangeDate($startDate='', $endDate='')\r\n\t{\r\n\t\t$em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');\r\n\r\n\t\t$startDateTime = \\DateTime::createFromFormat('d/m/Y', $startDate);\r\n\t\t$endDateTime = \\DateTime::createFromFormat('d/m/Y', $endDate);\r\n\r\n\t\tif ($startDate != '' && $endDate != '') {\r\n\t\t\t$dateRange = \"(g.publicationDate >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0' AND g.publicationDate <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0')\";\r\n\t\t} elseif ($startDate == '' && $endDate != '') {\r\n\t\t\t$dateRange = \"g.publicationDate <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} elseif ($startDate != '' && $endDate == '') {\r\n\t\t\t$dateRange = \"g.publicationDate >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} else {\r\n\t\t\t$dateRange = \"g.publicationDate IS NOT NULL\";\r\n\t\t}\r\n\r\n\t\t$query = $em->createQuery('\r\n\t\t\tSELECT COUNT(g.id) FROM PlaygroundGame\\Entity\\Game g\r\n\t\t\tWHERE ' . $dateRange . '\r\n\t\t\tAND g.active=1\r\n\t\t');\r\n\t\t$count = $query->getSingleScalarResult();\r\n\t\treturn $count;\r\n\t}", "public function getParticipationsByRangeDate($startDate='', $endDate='')\r\n\t{\r\n\t\t$em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');\r\n\r\n\t\t$startDateTime = \\DateTime::createFromFormat('d/m/Y', $startDate);\r\n\t\t$endDateTime = \\DateTime::createFromFormat('d/m/Y', $endDate);\r\n\r\n\t\tif ($startDate != '' && $endDate != '') {\r\n\t\t\t$dateRange = \"(e.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0' AND e.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0')\";\r\n\t\t} elseif ($startDate == '' && $endDate != '') {\r\n\t\t\t$dateRange = \"e.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} elseif ($startDate != '' && $endDate == '') {\r\n\t\t\t$dateRange = \"e.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} else {\r\n\t\t\t$dateRange = \"e.created_at IS NOT NULL\";\r\n\t\t}\r\n\r\n\t\t$query = $em->createQuery('\r\n\t\t\tSELECT COUNT(e.id) FROM PlaygroundGame\\Entity\\Entry e\r\n\t\t\tWHERE ' . $dateRange . '\r\n\t\t\tAND e.active=0\r\n\t\t');\r\n\t\t$count = $query->getSingleScalarResult();\r\n\t\treturn $count;\r\n\t}", "public function getListBadgeCountByRangeDate($badges, $startDate='', $endDate='')\r\n\t{\r\n\t\t$em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');\r\n\r\n\t\t$startDateTime = \\DateTime::createFromFormat('d/m/Y', $startDate);\r\n\t\t$endDateTime = \\DateTime::createFromFormat('d/m/Y', $endDate);\r\n\t \r\n\t\t$rsm = new \\Doctrine\\ORM\\Query\\ResultSetMapping;\r\n\t \r\n\t\t$select = array();\r\n\t\t$i = 0;\r\n\r\n\t\tforeach($badges as $badge => $levels) {\r\n\t\t\tforeach($levels as $level) {\r\n\t\t\t\t$filter = array('a.id');\r\n\t\t\t\tif($badge != 'total') {\r\n\t\t\t\t\t$filter[] = 'a.category = \\''.$badge.'\\'';\r\n\t\t\t\t}\r\n\t\t\t\tif($level > 0){\r\n\t\t\t\t\t$filter[] = 'a.level = '.( (int) $level );\r\n\t\t\t\t}\r\n\t\t\t\t$rsm->addScalarResult('c'.$i, 'c'.$i);\r\n\t\t\t\t$select[] = 'SUM(CASE WHEN '.implode(' AND ',$filter).' THEN 1 ELSE 0 END) AS c'.$i++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($startDate != '' && $endDate != '') {\r\n\t\t\t$dateRange = \"(a.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0' AND a.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0')\";\r\n\t\t} elseif ($startDate == '' && $endDate != '') {\r\n\t\t\t$dateRange = \"a.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} elseif ($startDate != '' && $endDate == '') {\r\n\t\t\t$dateRange = \"a.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} else {\r\n\t\t\t$dateRange = \"a.created_at IS NOT NULL\";\r\n\t\t}\r\n\r\n\t\t$query = $em->createNativeQuery('\r\n\t\t\tSELECT '.implode(',',$select).' FROM reward_achievement a\r\n\t\t\tWHERE ' . $dateRange, $rsm);\r\n\t\treturn array_values( $query->getSingleResult() );\r\n\t}", "public static function getNewUserCountWithDateRange($startDate, $endDate)\n\t{\n $link = TDOUtil::getDBLink();\n if(!$link)\n {\n\t\t\treturn false;\n }\n\t\t\n\t\t$sql = \"SELECT COUNT(*) FROM tdo_user_accounts WHERE creation_timestamp >= $startDate AND creation_timestamp <= $endDate\";\n//\t\terror_log(\"SQL: $sql\");\n\t\t\n\t\t$result = mysql_query($sql, $link);\n\t\t\n\t\tif($result)\n\t\t{\n\t\t\tif($row = mysql_fetch_array($result))\n\t\t\t{\n if(isset($row['0']))\n {\n \t\t\tTDOUtil::closeDBLink($link);\n return $row['0'];\n }\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror_log(\"TDOUser::getNewUserCountWithDateRange($startDate, $endDate): Unable to get user count\");\n\t\t}\n\t\t\n TDOUtil::closeDBLink($link);\n return false;\n\t}", "public function getListShareCountByRangeDate($types, $startDate = '', $endDate = '')\r\n\t{\r\n\t\t$em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');\r\n\r\n\t\t$startDateTime = \\DateTime::createFromFormat('d/m/Y', $startDate);\r\n\t\t$endDateTime = \\DateTime::createFromFormat('d/m/Y', $endDate);\r\n\r\n\t\t$rsm = new \\Doctrine\\ORM\\Query\\ResultSetMapping;\r\n\r\n\t\t$select = array();\r\n\t\t$i = 0;\r\n\r\n\t\tforeach( $types as $type ) {\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'sponsoredMembers':\r\n\t\t\t\t\t$filter = \"e.action_id =20\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'shares':\r\n\t\t\t\t\t$filter = \"e.action_id IN (13,14,15,16,17)\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'profilShares':\r\n\t\t\t\t\t$filter = \"e.action_id IN (13,14,15,16,17) AND e.label like '%espace client%'\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'fbInvit':\r\n\t\t\t\t\t$filter = \"e.action_id IN (14,15) AND e.label NOT like '%espace client%'\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'twInvit':\r\n\t\t\t\t\t$filter = \"e.action_id=16 AND e.label NOT like '%espace client%'\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'glInvit':\r\n\t\t\t\t\t$filter = \"e.action_id=17 AND e.label NOT like '%espace client%'\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'mailInvit':\r\n\t\t\t\t\t$filter = \"e.action_id=13 AND e.label NOT like '%espace client%'\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$rsm->addScalarResult('c'.$i, 'c'.$i);\r\n\t\t\t$select[] = 'SUM(CASE WHEN '.$filter.' THEN 1 ELSE 0 END) AS c'.$i++;\r\n\t\t}\r\n\r\n\t\tif ($startDate != '' && $endDate != '') {\r\n\t\t\t$dateRange = \"(e.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0' AND e.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0')\";\r\n\t\t} elseif ($startDate == '' && $endDate != '') {\r\n\t\t\t$dateRange = \"e.created_at <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} elseif ($startDate != '' && $endDate == '') {\r\n\t\t\t$dateRange = \"e.created_at >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} else {\r\n\t\t\t$dateRange = \"e.created_at IS NOT NULL\";\r\n\t\t}\r\n\r\n\t\t$query = $em->createNativeQuery('\r\n\t\t\tSELECT '.implode(',',$select).' FROM reward_event e\r\n\t\t\tWHERE ' . $dateRange, $rsm);\r\n\t\treturn array_values($query->getSingleResult());\r\n\t}", "function countTotalLoggedUsersInBetween($startDate, $endDate, $limit = 0, $offsetStart = 0, $offsetEnd = 0)\n {\n\n // define all the global variables\n global $database, $message, $settings, $user;\n\n // check if current user has the required permission\n if (!$user->hasPermission(\"analytics_countLoggedUsersInBetween\")) {\n $message->setError(\"You don't have the permission to perform this action\", Message::Error);\n return false;\n }\n\n // check if any limits are set\n if ($limit != 0) {\n $limitArgs = \" LIMIT \" . $limit;\n } else {\n $limitArgs = \"\";\n }\n\n // check if any offsets has been used\n if ($offsetEnd != 0 && $offsetEnd >= $offsetStart) {\n $limitArgs = \" LIMIT \" . $offsetStart . \",\" . $offsetEnd;\n }\n\n // call the database and get the results back\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE\n \" . TBL_USERS_LAST_LOGIN . \" >= '$startDate' AND \n \" . TBL_USERS_LAST_LOGIN . \" <= '$endDate'\" . $limitArgs;\n\n // get the sql results\n if (!$result = $database->getQueryResults($sql)) {\n return false;\n }\n\n return $database->getQueryNumRows($result, true);\n }", "public function getArticlesByRangeDate($startDate='', $endDate='')\r\n\t{\r\n\t\t$em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');\r\n\r\n\t\t$startDateTime = \\DateTime::createFromFormat('d/m/Y', $startDate);\r\n\t\t$endDateTime = \\DateTime::createFromFormat('d/m/Y', $endDate);\r\n\r\n\t\tif ($startDate != '' && $endDate != '') {\r\n\t\t\t$dateRange = \"(p.publicationDate >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0' AND p.publicationDate <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0')\";\r\n\t\t} elseif ($startDate == '' && $endDate != '') {\r\n\t\t\t$dateRange = \"p.publicationDate <= '\" . $endDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} elseif ($startDate != '' && $endDate == '') {\r\n\t\t\t$dateRange = \"p.publicationDate >='\" . $startDateTime->format('Y-m-d') . \" 0:0:0'\";\r\n\t\t} else {\r\n\t\t\t$dateRange = \"p.publicationDate IS NOT NULL\";\r\n\t\t}\r\n\r\n\t\t$query = $em->createQuery('\r\n\t\t\tSELECT COUNT(p.id) FROM PlaygroundCms\\Entity\\Page p\r\n\t\t\tWHERE ' . $dateRange . '\r\n\t\t\tAND p.active=1\r\n\t\t');\r\n\t\t$count = $query->getSingleScalarResult();\r\n\t\treturn $count;\r\n\t}", "function countTotalRegisteredUsersInBetween($startDate, $endDate, $limit = 0, $offsetStart = 0, $offsetEnd = 0)\n {\n\n // define all the global variables\n global $database, $message, $settings, $user;\n\n // check if current user has the required permission\n if (!$user->hasPermission(\"analytics_countRegisteredUsersInBetween\")) {\n $message->setError(\"You don't have the permission to perform this action\", Message::Error);\n return false;\n }\n\n // check if any limits are set\n if ($limit != 0) {\n $limitArgs = \" LIMIT \" . $limit;\n } else {\n $limitArgs = \"\";\n }\n\n // check if any offsets has been used\n if ($offsetEnd != 0 && $offsetEnd >= $offsetStart) {\n $limitArgs = \" LIMIT \" . $offsetStart . \",\" . $offsetEnd;\n }\n\n // call the database and get the results back\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE\n \" . TBL_USERS_DATE_JOINED . \" >= '$startDate' AND \n \" . TBL_USERS_DATE_JOINED . \" <= '$endDate'\" . $limitArgs;\n\n // get the sql results\n $result = $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n $row = $database->getQueryNumRows($result, true);\n\n\n return $row;\n }", "public function get_count_within_range( $data, $start_date, $chart_interval ) {\n\t\t$results = array();\n\t\tforeach( $data as $d ) {\n\t\t\t$date_time = $d->post_date;\n\n\t \t\t//Add one more, so it includes the current day\n\t\t\tif( ($date_time <= ($start_date + ($chart_interval * 86400) + 86400) && \n\t\t\t\t$date_time >= $start_date) || \n\t\t\t\t$chart_interval == 0)\n\t\t\t\t$results[] = $d;\n\t\t}\n\t\treturn $results;\n\t}", "public function count_inbound_outbound_calls($start_date, $end_date){\n $result['inbound'] = 0;\n $result['outbound'] = 0;\n\n $sql = \"SELECT count(`call_direction`) as inbound\n from \".db_prefix().\"call_logs where call_direction = 1 AND DATE_FORMAT(`call_start_time`,'%Y-%m-%d') between '\".$start_date.\"' AND '\".$end_date.\"' \" ;\n $query = $this->db->query($sql);\n $row = $query->row();\n if (isset($row)){\n $result['inbound'] = $row->inbound;\n }\n\n $sql = \"SELECT count(`call_direction`) as outbound\n from `tblcall_logs` where call_direction = 2 AND DATE_FORMAT(`call_start_time`,'%Y-%m-%d') between '\".$start_date.\"' AND '\".$end_date.\"' \" ;\n $query = $this->db->query($sql);\n $row = $query->row();\n if (isset($row)){\n $result['outbound'] = $row->outbound;\n }\n\n return $result;\n }", "function getTotalLoggedUsersInBetween($startDate, $endDate, $limit = 0, $offsetStart = 0, $offsetEnd = 0)\n {\n\n // define all the global variables\n global $database, $message, $settings, $user;\n\n // check if current user has the required permission\n if (!$user->hasPermission(\"analytics_loggedUsersInBetween\")) {\n $message->setError(\"You don't have the permission to perform this action\", Message::Error);\n return false;\n }\n\n // Set the required parameters\n $users = \"\";\n\n // check if any limits are set\n if ($limit != 0) {\n $limitArgs = \" LIMIT \" . $limit;\n } else {\n $limitArgs = \"\";\n }\n\n // check if any offsets has been used\n if ($offsetEnd != 0 && $offsetEnd >= $offsetStart) {\n $limitArgs = \" LIMIT \" . $offsetStart . \",\" . $offsetEnd;\n }\n\n // call the database and get the results back\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE\n \" . TBL_USERS_LAST_LOGIN . \" >= '$startDate' AND \n \" . TBL_USERS_LAST_LOGIN . \" <= '$endDate'\" . $limitArgs;\n\n // get the sql results\n if (!$results = $database->getQueryResults($sql)) {\n return false;\n }\n\n foreach ($database->getQueryEffectedRows($results, true) as $row) {\n $currentUser = new User();\n $currentUser->initInstance($row);\n\n $users[] = $currentUser;\n }\n\n return $users;\n }", "public function findTotalChargesPerPersonByUserIdForChargeDates($start_date = null, $end_date = null) {\n if ($start_date === null) {\n $start_date = self::MIN_CHARGE_DATE;\n }\n if ($end_date === null) {\n $end_date = self::MAX_CHARGE_DATE;\n }\n $params = [\n \":start_date\" => $start_date,\n \":end_date\" => $end_date,\n ];\n $charges = $this->doManagedQuery(\"findTotalChargesByUserIdForChargeDates\", $params);\n $total_charges_by_user_id = [];\n foreach ($charges as $user_info) {\n $user_id = $user_info[\"user_id\"];\n if ($user_id == 107) {\n $total_charges = $user_info[\"total_charges\"] / 2; // Jamie and Elara\n } else {\n $total_charges = $user_info[\"total_charges\"];\n }\n $total_charges_by_user_id[$user_id] = $total_charges;\n }\n return $total_charges_by_user_id;\n }", "function getAllUsersCount() {\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n try {\n\t\t $params = null;\n $userObj = new App42Response();\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/count/all\";\n $response = RestClient::get($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $userObj->setStrResponse($response->getResponse());\n $userObj->setResponseSuccess(true);\n $userResponseObj = new UserResponseBuilder();\n $userObj->setTotalRecords($userResponseObj->getTotalRecords($response->getResponse()));\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }", "private static function get_user_counts() {\n\t\t$user_count = array();\n\t\t$user_count_data = count_users();\n\t\t$user_count['total'] = $user_count_data['total_users'];\n\n\t\t// Get user count based on user role\n\t\tforeach ( $user_count_data['avail_roles'] as $role => $count ) {\n\t\t\t$user_count[ $role ] = $count;\n\t\t}\n\n\t\treturn $user_count;\n\t}", "function getTotalRegisteredUsersInBetween($startDate, $endDate, $limit = 0, $offsetStart = 0, $offsetEnd = 0)\n {\n\n // define all the global variables\n global $database, $message, $settings, $user;\n\n // check if current user has the required permission\n if (!$user->hasPermission(\"analytics_registeredUsersInBetween\")) {\n $message->setError(\"You don't have the permission to perform this action\", Message::Error);\n return false;\n }\n\n // Set the required parameters\n $users = \"\";\n\n // check if any limits are set\n if ($limit != 0) {\n $limitArgs = \" LIMIT \" . $limit;\n } else {\n $limitArgs = \"\";\n }\n\n // check if any offsets has been used\n if ($offsetEnd != 0 && $offsetEnd >= $offsetStart) {\n $limitArgs = \" LIMIT \" . $offsetStart . \",\" . $offsetEnd;\n }\n\n // call the database and get the results back\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE\n \" . TBL_USERS_DATE_JOINED . \" >= '$startDate' AND \n \" . TBL_USERS_DATE_JOINED . \" <= '$endDate'\" . $limitArgs;\n\n // get the sql results\n if (!$results = $database->getQueryResults($sql)) {\n return false;\n }\n\n foreach ($database->getQueryEffectedRows($results, true) as $row) {\n $currentUser = new User();\n $currentUser->initInstance($row);\n\n $users[] = $currentUser;\n }\n\n return $users;\n }", "public function countReports(){\n\t\t$date = date('Y-m-d');\n\t\t$from = Input::get('start');\n\t\tif(!$from) $from = date('Y-m-01');\n\t\t$to = Input::get('end');\n\t\tif(!$to) $to = $date;\n\t\t$toPlusOne = date_add(new DateTime($to), date_interval_create_from_date_string('1 day'));\n\t\t$counts = Input::get('counts');\n\t\t$accredited = array();\n\t\t//\tBegin grouped test counts\n\t\tif($counts==trans('messages.grouped-test-counts'))\n\t\t{\n\t\t\t$testCategories = TestCategory::all();\n\t\t\t$testTypes = TestType::all();\n\t\t\t$ageRanges = array('0-5', '5-15', '15-120');\t//\tAge ranges - will definitely change in configurations\n\t\t\t$gender = array(Patient::MALE, Patient::FEMALE); \t//\tArray for gender - male/female\n\n\t\t\t$perAgeRange = array();\t// array for counts data for each test type and age range\n\t\t\t$perTestType = array();\t//\tarray for counts data per testype\n\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\tSession::flash('message', trans('messages.check-date-range'));\n\t\t\t}\n\t\t\tforeach ($testTypes as $testType) {\n\t\t\t\t$countAll = $testType->groupedTestCount(null, null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$countMale = $testType->groupedTestCount([Patient::MALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$countFemale = $testType->groupedTestCount([Patient::FEMALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$perTestType[$testType->id] = ['countAll'=>$countAll, 'countMale'=>$countMale, 'countFemale'=>$countFemale];\n\t\t\t\tforeach ($ageRanges as $ageRange) {\n\t\t\t\t\t$maleCount = $testType->groupedTestCount([Patient::MALE], $ageRange, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t\t$femaleCount = $testType->groupedTestCount([Patient::FEMALE], $ageRange, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t\t$perAgeRange[$testType->id][$ageRange] = ['male'=>$maleCount, 'female'=>$femaleCount];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn View::make('reports.counts.groupedTestCount')\n\t\t\t\t\t\t->with('testCategories', $testCategories)\n\t\t\t\t\t\t->with('ageRanges', $ageRanges)\n\t\t\t\t\t\t->with('gender', $gender)\n\t\t\t\t\t\t->with('perTestType', $perTestType)\n\t\t\t\t\t\t->with('perAgeRange', $perAgeRange)\n\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse if($counts==trans('messages.ungrouped-specimen-counts')){\n\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\tSession::flash('message', trans('messages.check-date-range'));\n\t\t\t}\n\n\t\t\t$ungroupedSpecimen = array();\n\t\t\tforeach (SpecimenType::all() as $specimenType) {\n\t\t\t\t$rejected = $specimenType->countPerStatus([Specimen::REJECTED], $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$accepted = $specimenType->countPerStatus([Specimen::ACCEPTED], $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$total = $rejected+$accepted;\n\t\t\t\t$ungroupedSpecimen[$specimenType->id] = [\"total\"=>$total, \"rejected\"=>$rejected, \"accepted\"=>$accepted];\n\t\t\t}\n\n\t\t\t// $data = $data->groupBy('test_type_id')->paginate(Config::get('kblis.page-items'));\n\t\t\treturn View::make('reports.counts.ungroupedSpecimenCount')\n\t\t\t\t\t\t\t->with('ungroupedSpecimen', $ungroupedSpecimen)\n\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t->withInput(Input::all());\n\n\t\t}\n\t\telse if($counts==trans('messages.grouped-specimen-counts')){\n\t\t\t$ageRanges = array('0-5', '5-15', '15-120');\t//\tAge ranges - will definitely change in configurations\n\t\t\t$gender = array(Patient::MALE, Patient::FEMALE); \t//\tArray for gender - male/female\n\n\t\t\t$perAgeRange = array();\t// array for counts data for each test type and age range\n\t\t\t$perSpecimenType = array();\t//\tarray for counts data per testype\n\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\tSession::flash('message', trans('messages.check-date-range'));\n\t\t\t}\n\t\t\t$specimenTypes = SpecimenType::all();\n\t\t\tforeach ($specimenTypes as $specimenType) {\n\t\t\t\t$countAll = $specimenType->groupedSpecimenCount([Patient::MALE, Patient::FEMALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$countMale = $specimenType->groupedSpecimenCount([Patient::MALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$countFemale = $specimenType->groupedSpecimenCount([Patient::FEMALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$perSpecimenType[$specimenType->id] = ['countAll'=>$countAll, 'countMale'=>$countMale, 'countFemale'=>$countFemale];\n\t\t\t\tforeach ($ageRanges as $ageRange) {\n\t\t\t\t\t$maleCount = $specimenType->groupedSpecimenCount([Patient::MALE], $ageRange, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t\t$femaleCount = $specimenType->groupedSpecimenCount([Patient::FEMALE], $ageRange, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t\t$perAgeRange[$specimenType->id][$ageRange] = ['male'=>$maleCount, 'female'=>$femaleCount];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn View::make('reports.counts.groupedSpecimenCount')\n\t\t\t\t\t\t->with('specimenTypes', $specimenTypes)\n\t\t\t\t\t\t->with('ageRanges', $ageRanges)\n\t\t\t\t\t\t->with('gender', $gender)\n\t\t\t\t\t\t->with('perSpecimenType', $perSpecimenType)\n\t\t\t\t\t\t->with('perAgeRange', $perAgeRange)\n\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse{\n\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\tSession::flash('message', trans('messages.check-date-range'));\n\t\t\t}\n\n\t\t\t$ungroupedTests = array();\n\t\t\tforeach (TestType::all() as $testType) {\n\t\t\t\t$pending = $testType->countPerStatus([Test::PENDING, Test::STARTED], $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$complete = $testType->countPerStatus([Test::COMPLETED, Test::VERIFIED], $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$ungroupedTests[$testType->id] = [\"complete\"=>$complete, \"pending\"=>$pending];\n\t\t\t}\n\n\t\t\t// $data = $data->groupBy('test_type_id')->paginate(Config::get('kblis.page-items'));\n\t\t\treturn View::make('reports.counts.ungroupedTestCount')\n\t\t\t\t\t\t\t->with('ungroupedTests', $ungroupedTests)\n\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t->withInput(Input::all());\n\t\t}\n\t}", "public static function getNumbersCalled($dates)\n {\n return self::select(DB::raw('dst, count(dst) as totalcalls, sum(billsec) as totaltime'))\n ->where('calldate', '>=', $dates['start'] . \"00:00:00\")\n ->where('calldate', '<=', $dates['end'] . \"23:59:00\") \n ->where('outbound_cnum', '!=', '')\n ->where('disposition', '=', 'ANSWERED')\n ->groupBy('dst')\n ->orderByRaw('count(dst) desc')\n ->get();\n }", "function &getImages( $user, $category = false )\r\n {\r\n return eZImageCategory::images( \"time\", 0, -1, $category );\r\n }", "public function sumCountOfReports($dateStart, $dateEnd);", "function CountDates($arrayDate)\n\t\t{\n\t\t\t\n\t\t\t\t\tforeach ($arrayDate as $data)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($this->graphArray,array('comment'=>0,'favorite'=>0,'upload'=>0));\n\t\t\t\t\t}\n\t\t\n\t\t\n\n\t\t\t\t\tforeach ($this->commentDates as $data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\tforeach ($arrayDate as $date)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->IsDateBetween($date['startdate'], $data,$date['enddate']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->graphArray[$i]['comment']++;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\tforeach ($this->favoriteDates as $data)\n\t\t\t\t\t{\n\t\t\t\n\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\tforeach ($arrayDate as $date)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->IsDateBetween($date['startdate'], $data,$date['enddate']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->graphArray[$i]['favorite']++;\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tif($this->userName==$this->channelName)\n\t\t\t\t\tif(isset($uploadDates))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($uploadDates as $data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\t\tforeach ($arrayDate as $date)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($this->IsDateBetween($date['startdate'], $data,$date['enddate']))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->graphArray[$i]['upload']++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t}\n\t\t\t\n\t\t\t}", "public function getUsageCount()\n {\n $today = Carbon::now('Asia/Singapore')->toDateTimeString();\n $timezone = new Carbon('Asia/Singapore');\n $last_thirty_days = $timezone->subDays(30);\n\n return count($this->appUserBlurb->where('interaction_type', 'use')->whereBetween('created_at', array($last_thirty_days->toDateTimeString(), $today))->groupBy('app_user_id')->get());\n }", "function get_user_percentage_age($from=null, $to=null)\r\n {\r\n if($to ==null) $to =date('Y-m-d');\r\n if($from==null) $from=date('Y-m-d', strtotime(\"-1 week\", strtotime($to)));\r\n \r\n $list = array(\r\n array(0),\r\n array(1, 10),\r\n range(11, 15),\r\n range(16, 19),\r\n range(20, 22),\r\n range(23, 25),\r\n range(26, 28),\r\n range(29, 30),\r\n range(31, 40),\r\n range(41, 200)\r\n );\r\n\r\n $output = array(array('연령' , '비율'));\r\n $data = array();\r\n\r\n $i = 1;\r\n //query\r\n $sql = \"SELECT DATE_FORMAT(CURRENT_DATE, '%Y')-DATE_FORMAT(birth, '%Y')+1 as age,\r\n count(gender) as age_count, \r\n count(user_id) as user_count, all_count \r\n from users \r\n left join user_profiles on users.id = user_profiles.user_id \r\n join (select count(id) as all_count from users where activated=? and created between ? and ?) all_user \r\n WHERE created between ? and ?\r\n group by age\"; \r\n $query = $this->db->query($sql, array(1, $from, $to, $from, $to));\r\n foreach ($query->result() as $row)\r\n {\r\n if(is_null($row->age)) continue;\r\n foreach($list as $k=>$v){\r\n if(in_array($row->age, $v)){\r\n $data[$k] += round($row->age_count*100/$row->all_count, 2);\r\n }\r\n }\r\n }\r\n\r\n foreach($list as $k=>$v){\r\n $i = $k+1;\r\n $output[$i][0] = (string)((count($v)>1)?$v[0].\"~\".$v[count($v)-1]:\"{$v[0]}\");\r\n $output[$i][1] = round($data[$k], 2);\r\n }\r\n\r\n return $output; \r\n /* \r\n //---- dummy data\r\n $dateNum = floor((strtotime($to)-strtotime($from))/86400)+1;\r\n $output = array(array('연령' , '비율'));\r\n if($dateNum>0){\r\n $AxisX = array(\"0\", \"1~10\", \"11~15\", \"16~19\", \"20~22\", \"23~25\", \"26~28\", \"29~30\", \"31~40\", \"41~\");\r\n $i = 1;\r\n foreach($AxisX as $text){\r\n $normal = array(\"11~15\", \"16~19\", \"26~28\", \"29~30\", \"31~40\", \"41~\");\r\n $large = array(\"20~22\", \"23~25\", \"26~28\");\r\n if(in_array($text, $normal)){\r\n $num = rand(70, 100);\r\n } else if(in_array($text, $large)){\r\n $num = rand(0, 30);\r\n } else{\r\n $num = 0;\r\n }\r\n $output[$i] = array($text, $num);\r\n $i++;\r\n }\r\n }\r\n return $output;*/\r\n }", "public function countVotesCreatedBetweenDatesGroupByDates(\\DateTime $dateTimeInit, \\DateTime $dateTimeEnd)\n\t{\n\t\t$queryBuilder = $this->em->createQueryBuilder();\n\t\t$queryBuilder->select('DATE(v.publicatedAt) AS DateCreatedAt, COUNT(v.publicatedAt) AS Votes, COUNT(DISTINCT v.participant) AS Users')\n\t\t->from($this->class,'v')\n\t\t->where($queryBuilder->expr()->between('v.publicatedAt', ':dateTimeInit', ':dateTimeEnd'))\n\t\t->addGroupBy('DateCreatedAt')\n\t\t->addOrderBy('DateCreatedAt');\n\t\n\t\n\t\t$queryBuilder->setParameter('dateTimeInit',$dateTimeInit->format(self::DATE_FORMAT));\n\t\t$queryBuilder->setParameter('dateTimeEnd',$dateTimeEnd->format(self::DATE_FORMAT));\n\t\n\t\t$result = $queryBuilder->getQuery()->getScalarResult();\n\t\n\t\treturn $result;\n\t}", "function getUsersCount() {\n $company_id = $this->getId(); \n \treturn Users::count(\"company_id LIKE $company_id\");\n }", "public function getTicketCountByRecipientAndDates(CUSTOMER $customer, $beginDate, $endDate) {\n\n $count = $this->database->count(\"ticket\", \"*\",\n [\n \"recipient_id\" => $customer->getId(), \"date[<>]\"=>[$beginDate, $endDate]\n ]);\n\n return $count;\n }", "public function getUsageCountPaginate()\n {\n $today = Carbon::now('Asia/Singapore')->toDateTimeString();\n $timezone = new Carbon('Asia/Singapore');\n $last_thirty_days = $timezone->subDays(30);\n\n $appUserBlurb = $this->appUserBlurb->where('interaction_type', 'use')->whereBetween('created_at', array($last_thirty_days->toDateTimeString(), $today))->groupBy('app_user_id')->get()->toArray();\n\n $app_user_ids = array_map(function ($structure) {\n return $structure['app_user_id'];\n\n }, $appUserBlurb);\n\n return $this->appUser->whereIn('id', $app_user_ids)->orderByRaw(\"FIELD(status , 'Approved', 'Disabled', 'Blocked') ASC\")->paginate(10);\n }", "function getLockedUsersCount() {\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n\n try {\n\t\t $params = null;\n $userObj = new App42Response();\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/count/locked\";\n $response = RestClient::get($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $userObj->setStrResponse($response->getResponse());\n $userObj->setResponseSuccess(true);\n $userResponseObj = new UserResponseBuilder();\n $userObj->setTotalRecords($userResponseObj->getTotalRecords($response->getResponse()));\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }", "public function searchCountDate ($theme, $from, $to){\n $json = new JsonFile ($this->host . '/api/' . $theme . '/count/date?from='. $from . \"&to=\" . $to);\n $json->parse();\n \n return $json;\n }", "public function getHistories($user_id = null ,$fromDate = null ,$toDate = null,$params = array())\n {\n \n $condition = array();\n $condition =\" 1=1 \";\n if ($user_id != null)\n {\n $condition .= \" AND his.user_id = \".$user_id;\n }\n if ($fromDate != null)\n {\n $condition .= \" AND DATEDIFF(DATE_FORMAT( FROM_UNIXTIME(his.transaction_date),'%Y-%m-%d'),'\".$fromDate.\"')>=0\";\n }\n if ($toDate != null)\n {\n $condition .= \" AND DATEDIFF(DATE_FORMAT( FROM_UNIXTIME(his.transaction_date),'%Y-%m-%d'),'\".$toDate.\"')<=0\";\n }\n foreach($params as $key=>$value)\n {\n if ( $key != 'limit' && $key!='group_by')\n $condition .= $value;\n }\n if(!isset($params['limit']))\n $params['limit'] = 50;\n $count = 0;\n if(!isset($params['group_by']))\n {\n $count = 0;\n $t_table = Engine_Api::_()->getDbTable('transactionTrackings', 'mp3music');\n $t_name = $t_table->info('name');\n $select = $t_table->select()->setIntegrityCheck(false)\n ->from(\"$t_name as his\",array(\"DATE_FORMAT( FROM_UNIXTIME(his.transaction_date),'%Y-%m-%d' ) as pDate\",\n \"(SELECT count(*) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and item_type='song' and item_id>0 and transaction_status =1) as selling_sold_songs\",\n \"(SELECT count(*) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and item_type='album' and item_id>0 and transaction_status =1) as selling_sold_albums\",\n \"(SELECT count(*) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and item_id > 0 and transaction_status = 0) as selling_transaction_fail\",\n \"(SELECT count(*) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and item_id > 0 and transaction_status = 1) as selling_transaction_succ\",\n \"(SELECT sum(amount) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and (item_type='song' or item_type='album') and item_id>0 and transaction_status = 1 ) as selling_total_amount\"\n ));\n $select ->where($condition)\n ->group(\"DATE_FORMAT( FROM_UNIXTIME(his.transaction_date),'%Y-%m-%d')\")\n ->order(\"DATE_FORMAT( FROM_UNIXTIME(his.transaction_date),'%Y-%m-%d') DESC\")\n ->limit($params['limit']);\n $histories = $t_table->fetchAll($select)->toArray();\n $count = count($histories); \n return array($histories,$count);\n }\n else\n {\n $count = 0; \n $t_table = Engine_Api::_()->getDbTable('transactionTrackings', 'mp3music');\n $t_name = $t_table->info('name');\n $select = $t_table->select()->setIntegrityCheck(false)\n ->from(\"$t_name as his\",array(\"DATE_FORMAT( FROM_UNIXTIME(his.transaction_date),'%Y-%m-%d' ) as pDate\",\n \"(SELECT count(*) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and item_type='song' and item_id>0 and transaction_status =1) as selling_sold_songs\",\n \"(SELECT count(*) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and item_type='album' and item_id>0 and transaction_status =1) as selling_sold_albums\",\n \"(SELECT count(*) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and item_id > 0 and transaction_status = 0) as selling_transaction_fail\",\n \"(SELECT count(*) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and item_id > 0 and transaction_status = 1) as selling_transaction_succ\",\n \"(SELECT sum(amount) FROM \".$t_name.\" as t1 WHERE DATE_FORMAT( FROM_UNIXTIME(t1.transaction_date),'%Y-%m-%d') = pDate and (item_type='song' or item_type='album') and item_id>0 and transaction_status = 1 ) as selling_total_amount\"\n ));\n $select ->where($condition)\n ->group($params['group_by'])\n ->order(\"DATE_FORMAT( FROM_UNIXTIME(his.transaction_date),'%Y-%m-%d') ASC\")\n ->limit($params['limit']);\n $histories = $t_table->fetchAll($select)->toArray();\n $count = count($histories); \n return array($histories,$count);\n }\n \n }" ]
[ "0.6373758", "0.611192", "0.60245615", "0.60193956", "0.588854", "0.58060545", "0.5699149", "0.56943905", "0.56653905", "0.5563889", "0.55329126", "0.5487288", "0.5446137", "0.542717", "0.53767556", "0.5367526", "0.5349641", "0.53403664", "0.53330004", "0.5274494", "0.5236827", "0.52228653", "0.52145845", "0.52120006", "0.52089155", "0.51571935", "0.51441604", "0.5126235", "0.51106876", "0.5100337" ]
0.68856645
0
Returns the list of people who have favorited a given photo.
function photos_getFavorites ($photo_id, $page = 1, $per_page = 20) { $response = $this->execute(array('method' => 'flickr.photos.getFavorites', 'photo_id' => $photo_id, 'page' => $page, 'per_page' => $per_page)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photo']['person']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFavorites();", "public function find_favorites() {\n\t\tstatic $favorites;\n\n\t\tif (!is_array($favorites)) {\n\t\t\t$favorites = array();\n\t\t\tif ($this->loaded()) {\n\t\t\t\t$users = db::build()->select('user_id')->from('favorites')->where('event_id', '=', $this->id)->execute()->as_array();\n\t\t\t\tforeach ($users as $user) {\n\t\t\t\t\t$favorites[(int)$user['user_id']] = (int)$user['user_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $favorites;\n\t}", "function getAllFoodpornsByFavorite()\n {\n $stmt = self::$_db->prepare(\"SELECT fp.* FROM favorit AS fav LEFT JOIN foodporn AS fp On fav.fs_foodporn = fp.id_foodporn AND fav.fs_user=:uid WHERE id_foodporn IS NOT NULL\");\n $uid = self::getUserID();\n $stmt->bindParam(\":uid\", $uid);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "protected function favorited($username)\n {\n $user = User::whereUsername($username)->first();\n\n $presentIds = $user ? $user->favorites()->pluck('id')->toArray() : [];\n\n return $this->builder->whereIn('id', $presentIds);\n }", "function favorites() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($id, $auth)) {\n $this->response('', 400);\n }\n if ($id > 0) {\n $query = \"select * from favorites where user_id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n } \n }", "function favorites_getList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function favorites()\n {\n return $this->morphMany(Favorite::class, 'favorited');\n }", "public function favorited($userId=null)\n {\n if (is_null($userId)) {\n $userId = Auth()->id();\n }\n \n return (bool) $this->favorites()\n ->where('user_id', '=', $userId)\n ->count();\n }", "public function favorited($userId=null)\n\t{\n\t\tif(is_null($userId)) {\n\t\t\t$userId = $this->loggedInUserId();\n\t\t}\n\n\t\treturn (bool) $this->favorites()\n\t\t\t->where('user_id', '=', $userId)\n\t\t\t->count();\n\t}", "static public function getFavorites() {\r\n self::initFav();\r\n return self::$FAV;\r\n }", "public function favorites() {\n\t\t$favoriteSounds = Sound::whereHas('favorite', function($query) {\n\t\t\t$user = Auth::user();\n\n\t\t\t$query->where('userId', '=', $user->id);\n\t\t});\n\n\t\treturn Responder::success([\n\t\t\t'favoriteSounds' => $favoriteSounds->get()\n\t\t]);\n\t}", "function getFavouriteTags(){\n //first we get all the info on tags that belong to tasks that the current user has clicked on\n $clickInfo = $this->qh->getClickTagInfo($_SESSION['userID']);\n return $this->getFavourites($clickInfo, 'TagID');\n }", "public function favorites()\n {\n $favoriteClass = config('favorable.favorite_model');\n\n return $this->morphMany($favoriteClass, 'favoriteable');\n }", "public function getFavoriteSongs($userId){\n return $this->DB->queryFetchAllAssoc(\"SELECT s.* FROM user u, song s, favorite_songs fs WHERE fs.user_id = u.id AND fs.song_id = s.id AND u.id = $userId\");\n }", "function getFavorites(){\n\n\t$id = getUserID();\n\t$query = \"SELECT networks.area, networks.state, activities.activity_name FROM favorites, networks, activities, unique_networks WHERE user_id = \".$id.\"\"\n\t.\" AND favorites.unique_network_id = unique_networks.unique_network_id\"\n\t.\" AND unique_networks.activity_id = activities.activity_id\"\n\t.\" AND unique_networks.network_id = networks.network_id\";\n\t$result = mysql_query($query) or die(mysql_error());\n\t$favs = array();\n\twhile($row = mysql_fetch_array($result)){\n\t\t$favs[] = $row['area']. \", \". $row['state']. \" - \" .$row['activity_name'];\n\t}\n\treturn $favs;\n}", "function favorites($pid, $query = array(), $rawJson = false) {\n \t\tif ( $json = $this->_get('/merchants/'.$pid.'/favorites.json', $query) )\n \t\t\treturn $this->_parseApi($json, $rawJson);\n \t\telse\n \t\t\treturn false;\n }", "public function favorites($user, $options = []);", "public function getFavorites()\n {\n return $this->hasMany(Recipe::className(), ['id' => 'recipe_id'])\n ->viaTable('favorites', ['user_id' => 'id'])\n ->orderBy(['created_at' => SORT_DESC]);\n }", "public function favorite()\n {\n $mentor = User::leftJoin('review_mentor', 'user_id_mentor', '=', 'users.id')\n ->where('mentor', 'Y')\n ->groupBy('users.id')\n ->select('users.id', 'users.first_name', 'users.last_name', 'users.photo',\n DB::raw(\"SUM(CASE WHEN is_like = 'Y' THEN 1 ELSE 0 END) as islike \"),\n DB::raw(\"SUM(CASE WHEN is_like = 'N' THEN 1 ELSE 0 END) as unlike \")\n )\n ->get();\n return MentorFavorite::collection($mentor);\n }", "function getFavoritesWithIDs(){\n\n\t$id = getUserID();\n\t$query = \"SELECT unique_networks.unique_network_id, networks.area, networks.state, activities.activity_name FROM favorites, networks, activities, unique_networks WHERE user_id = \".$id.\"\"\n\t.\" AND favorites.unique_network_id = unique_networks.unique_network_id\"\n\t.\" AND unique_networks.activity_id = activities.activity_id\"\n\t.\" AND unique_networks.network_id = networks.network_id\";\n\t$result = mysql_query($query) or die(mysql_error());\n\t$favs = array();\n\twhile($row = mysql_fetch_array($result)){\n\t\t$favs[] = $row;\n\t}\n\treturn $favs;\n}", "public function favorites()\n\t{\n\t\treturn $this->morphMany(Favorite::class, 'favoriteable');\n\t}", "private function get_user_favorite_publics(){\r\n global $USER;\r\n\r\n if(isset($USER) && $USER->id > 0) {\r\n $publics = new PublicsByFunctionUser($USER->id, $this->tab);\r\n if($this->tab == 'formation'){\r\n return $publics->get_favorite_formation_publics();\r\n } else {\r\n return $publics->get_favorite_course_publics();\r\n }\r\n }\r\n return false;\r\n }", "public function favorite()\n {\n $attributes = ['user_id' => auth()->id()];\n\n if (! $this->favorites()->where($attributes)->exists()) {\n return $this->favorites()->create($attributes);\n }\n }", "public function getAllFavorites($user_id);", "public function myfavorites_get()\n {\n $user = $this->getCurrentUser();\n $criteria = new \\Doctrine\\Common\\Collections\\Criteria();\n //AQUI TODAS LAS EXPRESIONES POR LAS QUE SE PUEDE BUSCAR CON TEXTO\n $expresion = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"favorite\", \\Doctrine\\Common\\Collections\\Expr\\Comparison::EQ, 1);\n $criteria->where($expresion);\n $criteria->orderBy(array(\"visited_at\"=>\"DESC\"));\n $relacion = $user->getUserservices()->matching($criteria)->toArray();\n $result[\"desc\"] = \"Listado de los servicios marcados como favoritos por el usuario\";\n $result[\"data\"] = array();\n foreach ($relacion as $servicerel) {\n $service_obj = $servicerel->getService();\n $service_obj->loadRelatedData($user, null, site_url());\n $result[\"test\"] = $service_obj->loadRelatedUserData($user);\n $result[\"data\"][] = $service_obj;\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n\n }", "public function favorite(){\n $attributes = ['user_id' => auth()->id()];\n\n if(! $this->favorites()->where($attributes)->exists()){\n return $this->favorites()->create($attributes);\n }\n }", "public function favourites()\n {\n return $this->morphMany(Favourite::class, 'favourite');\n }", "public function getFavorites()\n {\n $tricks = $this->tricks->findAllFavorites($this->user);\n\n $this->view('user.favorites', compact('tricks'));\n }", "function favorites_getPublicList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$user_id = ($user_id) ? $user_id : $this->getUserId();\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getPublicList';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function favorites() {\n return $this->hasMany(Favorite::class);\n }" ]
[ "0.6755054", "0.66816044", "0.66116256", "0.6575815", "0.6478729", "0.6462401", "0.64249754", "0.6414417", "0.63521975", "0.62955076", "0.62857187", "0.6243544", "0.62431455", "0.6209417", "0.6202553", "0.6200787", "0.6184905", "0.6150616", "0.614637", "0.6143289", "0.6101929", "0.60996795", "0.60781634", "0.6035975", "0.60111016", "0.6006345", "0.59958255", "0.59752804", "0.5965309", "0.59316224" ]
0.7151414
0
Returns a list of your photos that are not part of any sets.
function photos_getNotInSet ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = 'all', $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.getNotInSet'; $params['per_page'] = $per_page; $params['page'] = $page; if ($min_upload_date) $params['min_upload_date'] = $min_upload_date; if ($max_upload_date) $params['max_upload_date'] = $max_upload_date; if ($min_taken_date) $params['min_taken_date'] = $min_taken_date; if ($max_taken_date) $params['max_taken_date'] = $max_taken_date; if ($privacy_filter) $params['privacy_filter'] = $privacy_filter; if ($media) $params['media'] = $media; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllWithoutFolders()\n {\n $query = $this->getQueryBuilder()->select('*')\n ->from($this->table)\n ->where('folder_id', '=', 0);\n\n if ($photos = $this->db->get_results($query->build())) {\n foreach ($photos as $index => $photo) {\n $photos[$index] = $this->extend($photo);\n }\n }\n\n return $photos;\n }", "function get_products_to_show()\n{\n $products = get_products();\n\n foreach ($products as $list_id => $product) {\n if (count($product['images']) == 0) {\n unset($products[$list_id]);\n }\n }\n\n return $products;\n}", "public static function get_unused_images(){\n\n $books = Media::get_unused_images_for_table(CONFIG::DBTables()->book);\n $movies = Media::get_unused_images_for_table(CONFIG::DBTables()->movie);\n $games = Media::get_unused_images_for_table(CONFIG::DBTables()->game);\n $users = Media::get_unused_images_for_table(CONFIG::DBTables()->user);\n\n $images = array(\n \"books\" => $books,\n \"movies\" => $movies,\n \"games\" => $games,\n \"users\" => $users\n );\n\n return $images;\n }", "public function getVotosNegativos()\n {\n return $this->getVotos()->where(['positivo' => false]);\n }", "function find_public_photos($ids_of_private_photos, $ids_of_all_users_photos_on_page)\n{\n $public_photos = [];\n\n foreach ($ids_of_all_users_photos_on_page as $photo_id)\n if (!in_array($photo_id, $ids_of_private_photos))\n array_push($public_photos, $photo_id);\n\n return $public_photos;\n}", "function get_list_of_non_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 0 ORDER BY date DESC');\n return $result;\n }", "public function filterNotNull(): Set;", "public function getIgnoreItems(): array;", "public function getExcludedIds();", "public function getUnsplashCollectionPhotos(){\n $images = $this->unsplash->unsplashCollectionPhotos();\n return $images;\n }", "public static function FindUnusedImages()\n {\n }", "function get_all_unmarked() {\n\n global $CFG;\n\n $sql = \"SELECT s.id as subid, s.userid, s.data2, a.course, a.assignmenttype, a.name, a.description, a.id, c.id as cmid\n FROM {$CFG->prefix}assignment a\n INNER JOIN {$CFG->prefix}course_modules c\n ON a.id = c.instance\n INNER JOIN {$CFG->prefix}assignment_submissions s\n ON s.assignment = a.id\n WHERE c.module = {$this->mainobject->modulesettings['assignment']->id}\n AND c.visible = 1\n AND a.course IN ({$this->mainobject->course_ids})\n AND s.timemarked < s.timemodified\n AND NOT (a.resubmit = 0 AND s.timemarked > 0)\n ORDER BY a.id\";\n\n $unmarked = get_records_sql($sql);\n\n // Due to oracle being rubbish, there is no way to put this bit into sql as the data2 field is\n // a CLOB and so cannot be used with any kind of comparison operator.\n // It used to be:\n // AND NOT (a.assignmenttype = 'upload' AND s.data2 != 'submitted'))\n \n\n foreach ($unmarked as $key => $submission) {\n\n if (($submission->data2 != 'submitted') && ($submission->assignmenttype == 'upload')) {\n unset($unmarked[$key]);\n }\n }\n \n\n $this->all_submissions = $unmarked;\n\n return true;\n }", "function photos_getWithoutGeoData ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getWithoutGeoData';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($min_upload_date) $params['min_upload_date'] = $min_upload_date;\n\t\tif ($max_upload_date) $params['max_upload_date'] = $max_upload_date;\n\t\tif ($min_taken_date) $params['min_taken_date'] = $min_taken_date;\n\t\tif ($max_taken_date) $params['max_taken_date'] = $max_taken_date;\n\t\tif ($privacy_filter) $params['privacy_filter'] = $privacy_filter;\n\t\tif ($media) $params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\tif ($sort) $params['sort'] = $sort;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public static function delete_unused_images(){\n\n $deleted_books = Media::delete_unused_images_for_table(CONFIG::DBTables()->book);\n $deleted_movies = Media::delete_unused_images_for_table(CONFIG::DBTables()->movie);\n $deleted_games = Media::delete_unused_images_for_table(CONFIG::DBTables()->game);\n $deleted_users = Media::delete_unused_images_for_table(CONFIG::DBTables()->user);\n\n $deleted_images = array(\n \"books\" => $deleted_books,\n \"movies\" => $deleted_movies,\n \"games\" => $deleted_games,\n \"users\" => $deleted_users\n );\n\n return $deleted_images;\n }", "function get_list_of_not_new_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE newfile = 0 AND flaggedfile = 0 ORDER BY date DESC');\n return $result;\n }", "public function get_skipped_posttypes() {\n\n $skipped_posttypes = array( 'attachment', 'revision', 'nav_menu_item', 'soliloquy', 'soliloquyv2', 'envira_album' );\n return apply_filters( 'envira_gallery_skipped_posttypes', $skipped_posttypes );\n\n }", "public function get_all_user_not_regis()\n\t{\n\t\t$sql = \"SELECT * FROM $this->hr_db.`hr_person` WHERE ps_id not in (SELECT su_ps_id FROM $this->swm_db.`swm_user`)\";\n\t\t$query = $this->swm->query($sql);\n\n\t\treturn $query;\n\t}", "public function except(...$post_ids): Collection;", "public function delete_unknown_images() {\n global $wpdb;\n $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image` WHERE gallery_id=0');\n }", "public function get_noPublishedRecipes() {\n\n $query = $this->db\n ->from('recipes')\n ->where('published', 0)\n ->order_by('created_at', 'DESC')\n ->get();\n\n return $result = $query->result();\n }", "private function get_unattached_ids() {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->get_col(\"SELECT `ID` FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND `post_status` = 'inherit' AND `post_parent` = '0'\");\n\t}", "public function getPartialMatchingImages()\n {\n return $this->partial_matching_images;\n }", "private function filterNotItems(array $output): array\n {\n foreach ($this->not as $exclude) {\n $translator = new PathTranslator($output);\n $paths = $translator->path($exclude);\n\n if (0 === $paths->count()) {\n continue;\n }\n\n foreach ($paths as $keys) {\n if (null !== $keys) {\n $this->removeFromArray($output, $keys->getPath());\n }\n }\n }\n\n return $output;\n }", "public function allWithoutTree()\n {\n return HandbookCategory::all();\n }", "private static function get_unused_images_for_table($table)\n {\n $images = array();\n\n /* Get media images in database */\n $media_images = Media::get_media_images($table);\n\n /* Get media images currently stored */\n if ($table === Config::DBTables()->user){\n $path = FileService::MAIN_DIR . \"/users\";\n $files = array_diff(scandir($path), array('.', '..'));\n $images = Media::add_unused_images_to_array($images, $media_images, $files, $path);\n }else{\n $users = array_diff(scandir(FileService::MAIN_DIR), array('.', '..'));\n foreach($users as $username){\n if ($username !== \"users\"){\n $user_path = FileService::MAIN_DIR . \"/\" . $username . \"/\" . $table . \"s\";\n $files = array_diff(scandir($user_path), array('.', '..'));\n $images = Media::add_unused_images_to_array($images, $media_images, $files, $user_path);\n }\n }\n }\n return $images;\n }", "function fumseck_exclude_image_posts( $query ) {\n\tif ( $query->is_main_query() && $query->is_home() ) {\n\t\t$feip_query = array(\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'post_format',\n\t\t\t\t'field' => 'slug',\n\t\t\t\t'terms' => array(\n\t\t\t\t\t'post-format-image'\n\t\t\t\t),\n\t\t\t\t'operator' => 'NOT IN',\n\t\t\t)\n\t\t);\n\t\t$query->set( 'tax_query', $feip_query );\n\t}\n}", "public function findDistinctUrlPics()\n {\n return $this->createStandardQueryBuilder()->distinct('pics.url')->sort('public_date', 1)->getQuery()->execute();\n }", "function photos_getUntagged ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = all, $extras = NULL, $sort = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getUntagged';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($min_upload_date) $params['min_upload_date'] = $min_upload_date;\n\t\tif ($max_upload_date) $params['max_upload_date'] = $max_upload_date;\n\t\tif ($min_taken_date) $params['min_taken_date'] = $min_taken_date;\n\t\tif ($max_taken_date) $params['max_taken_date'] = $max_taken_date;\n\t\tif ($privacy_filter) $params['privacy_filter'] = $privacy_filter;\n\t\tif ($media) $params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function excludedVoters()\n {\n return $this->voters()->where('is_excluded', true);\n }", "public static function getNotSubscribedProfiles()\n\t{\n\n\t\treturn self::where('status', '=', 'not-subscribed');\n\n\t}" ]
[ "0.65620744", "0.62283874", "0.6024571", "0.5930459", "0.58665824", "0.57660234", "0.57490873", "0.5699103", "0.56990856", "0.5698543", "0.56635684", "0.5616267", "0.55531436", "0.5526648", "0.54824513", "0.54305995", "0.542977", "0.53921473", "0.53813857", "0.5373835", "0.5363819", "0.53453374", "0.52664", "0.5251333", "0.5244369", "0.5240236", "0.52371", "0.5231588", "0.5230473", "0.5229071" ]
0.70838606
0
Get permissions for a photo.
function photos_getPerms ($photo_id) { $response = $this->execute(array('method' => 'flickr.photos.getPerms', 'photo_id' => $photo_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['perms']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPermissions();", "abstract public function getPermissions();", "public function getPermissions() {}", "public function getPermissions() {}", "public function get_permissions()\n\t{\n\t\treturn $this->area->get_permissions($this->path);\n\t}", "public function getPermissions()\n\t{\n\t\tif(isset($this->permissions))\n\t\t{\n\t\t\treturn $this->permissions;\n\t\t}\n\n\t\t$request = new ColoCrossing_Http_Request('/', 'GET');\n\t\t$executor = $this->getHttpExecutor();\n\t\t$response = $executor->executeRequest($request);\n\t\t$content = $response->getContent();\n\n\t\treturn $this->permissions = isset($content) && isset($content['permissions']) ? $content['permissions'] : array();\n\t}", "public function get_available_permissions()\n {\n try {\n $url = $this->get_url(\"graph\", \"me\", array(\"metadata\" => \"1\"));\n $data = $this->api_call($url);\n //echo $url;\n } catch (Exception $ex) {\n print_r($ex->getMessage());\n exit;\n }\n\n return $this->convert_array_to_object($data->metadata);\n }", "public function & GetPermissions ();", "public function getPossiblePermissions();", "public function getAllPermissions(): array;", "public function permissions()\n\t{\n\t\treturn $this->get('permissions');\n\t}", "public function getPermissions()\n {\n return $this->get(self::PERMISSIONS);\n }", "public function getAllPermissions();", "public function getAllPermissions();", "public function getObjectPermissions(): array;", "public function getPermissions() {\n\t\treturn $this->addressBookInfo['permissions'];\n\t}", "public function permissions() : ?array\n {\n if ($apiRoot = $this->request('GET', $this->identity->getUrl('/')))\n {\n $payload = $apiRoot->getPayload();\n\n if (isset($payload['permissions']) && is_array($payload['permissions']))\n {\n return $payload['permissions'];\n }\n }\n\n return null;\n }", "public function permissions() {\n\t$this->loadPermissions();\n\treturn $this->permissions;\n}", "public function getPermissions()\n {\n return $this->fileStructure->mode;\n }", "public function getPermissions()\r\n\t{\r\n\t\tif($this->accessToken === null) {\r\n\t\t\tthrow new SkydriveException_InvalidToken();\r\n\t\t}\r\n\t\t$url = self::baseUrl . \"permissions?access_token=\" . $this->accessToken;\r\n\t\t$result = $this->fetch($url);\r\n\t\treturn $result;\r\n\t}", "public function getPhoto()\n {\n return $this->execute('GET', '/' . self::PHOTO);\n }", "public function getFileOperationPermissions() {}", "public function getPermissions(): array {\n\t\tif ($this->permissions === null) {\n\t\t\t$this->permissions = UserQueries::getUserPermissions($this->id);\n\t\t}\n\n\t\treturn $this->permissions;\n\t}", "private function getPermissions()\n\t{\n\t\tif (!isset($this->permissions)) {\n\t\t\t$this->permissions = $this->permissions()->get();\n\t\t}\n\t\treturn $this->permissions;\n\t}", "public function getPermissions(): array {\n\t\treturn [];\n\t}", "public function permissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\r\n {\r\n return $this->getGuardUser()->getPermissions();\r\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }" ]
[ "0.6789415", "0.66065", "0.6573238", "0.6573238", "0.6457416", "0.635394", "0.63504314", "0.6339839", "0.622988", "0.6208075", "0.6201465", "0.61882824", "0.6182389", "0.6182389", "0.61682636", "0.60221034", "0.6005442", "0.596628", "0.59479654", "0.59190667", "0.5911445", "0.5886638", "0.58694404", "0.5850047", "0.58287764", "0.5812963", "0.5804657", "0.58004814", "0.58004814", "0.58004814" ]
0.6953229
0
Return a list of your photos that have been recently created or which have been recently modified.
function photos_recentlyUpdated ($per_page = 25, $page = 1, $min_date = NULL, $extras = NULL) { $params = array(); $params['method'] = 'flickr.photos.recentlyUpdated'; $params['per_page'] = $per_page; $params['page'] = $page; if (!$min_date) { $params['min_date'] = time()-604800;; } if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photos']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function PhotosPublic() {\n return $this->hasMany(Photo::class, 'user_uid', 'uid')\n ->orderBy('photos.moment', 'desc')\n ->whereRaw('datediff(now(), photos.moment) <= 10')\n ->where('status_id', 1);\n }", "public function getRecentCreatedUsers()\n {\n $result = $this\n ->_model\n ->orderBy('created_at', 'desc')\n ->get();\n\n return $result;\n }", "function get_list_of_new_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE newfile = 1 ORDER BY date DESC');\n return $result;\n }", "function get_list_of_not_new_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE newfile = 0 AND flaggedfile = 0 ORDER BY date DESC');\n return $result;\n }", "public function photos()\n {\n return $this->morphedByMany(Photo::class, 'taggable');\n }", "public function fetchRecentImages()\n {\n $posts = $this->_hc->get_rooms_history('517400','recent');\n $posts = array_reverse($posts);\n\n $images = array();\n foreach ($posts as $post) {\n $url = Image::parseImageUrl($post->message);\n if ($url !== null) {\n $images[] = array(\n 'url' => $url,\n 'date' => $post->date\n );\n }\n }\n\n return $images;\n }", "public function getTenLatestPhotos();", "public function get_recentfile_list($u_id){\n\t\t$this->db->select('images.img_id,images.img_name,images.imag_org_name,images.img_create_at,favourite.yes')->from('images');\t\t\n\t\t$this->db->join('favourite', 'favourite.file_id = images.img_id', 'left');\n\n\t\t$curr_date = date('Y-m-d h:i:s A', strtotime('-7 days'));\n\t\t$this->db->where('images.u_id', $u_id);\n\t\t$this->db->where('images.img_create_at >', $curr_date);\n\t\t$this->db->order_by(\"images.img_create_at\", \"DESC\");\n\t\treturn $this->db->get()->result_array();\n\t}", "public function recent()\n\t{\n\t\t$this->db->order_by('id', 'desc');\n\t\t$db_result = $this->db->get_where('files', array ('status' => 1), 4);\n\n\t\treturn $db_result->result();\n\t}", "public function getPhotos()\n {\n return $this->photos;\n }", "public function getAllPhotos();", "public function getPhotos();", "public function photos()\n {\n return $this->belongsToMany('App\\Photo')->withTimestamps();\n }", "public function getOrderedPhotos()\n {\n return $this->photos()->orderBy( 'photo_node.ordering', 'asc')->get();\n }", "function photos_getRecent ($per_page = 25, $page = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getRecent';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function get_list_of_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 1 ORDER BY date DESC');\n return $result;\n }", "function get_list_of_flagged_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE flaggedfile = 1 ORDER BY date DESC');\n return $result;\n }", "public function getFotos()\n\t{\n\t\treturn $this->fotos;\n\t}", "public function getNewFiles(): Collection\n {\n return $this->files->filter(function (File $file) {\n return $file->getStatus() === File::FILE_NEW;\n });\n }", "public function changes()\r\n\t{\r\n\t\t$Change = App::make('Change');\r\n\r\n\t\treturn $Change::where('fmodel', 'GalleryItem')\r\n\t\t\t\t \t ->where('fid', $this->id)\r\n\t\t\t\t \t ->with('user')\r\n\t\t\t\t \t ->orderBy('created_at', 'DESC')\r\n\t\t\t\t \t ->get();\r\n\t}", "function getLastViewed();", "function get_recent_files($num = 10)\n{\n return get_records('File', array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function headshots()\n {\n $compositeKey = [\n 'ezt_user_id' => $this->ezt_user_id,\n 'image_type' => 2\n ];\n\n return Image::where($compositeKey)->get();\n }", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "function getfileModifiedDates($fileArray){\n $imageDatesArray = [];\n date_default_timezone_set('America/Sao_Paulo');\n foreach($fileArray as $file){\n $imageDatesArray[] = date(\"d/m/Y H:i:s\", strtotime($file[\"modifiedTime\"]));\n }\n return $imageDatesArray;\n}", "public function getPhotos()\n {\n return $this->hasMany(Photo::className(), ['owner_id' => 'id']);\n }", "public function photos()\n {\n return $this->morphMany(Photo::class, \"viewable\");\n }", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "function getRecentChanges()\r\n\t{\r\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\r\n\t\t$changes = ilWikiPage::getRecentChanges(\"wpg\", $this->wiki_id);\r\n\t\t$this->setDefaultOrderField(\"date\");\r\n\t\t$this->setDefaultOrderDirection(\"desc\");\r\n\t\t$this->setData($changes);\r\n\t}", "public function getLastModifiedTime();" ]
[ "0.62896436", "0.6068572", "0.6035229", "0.60343254", "0.6008608", "0.5990642", "0.5977693", "0.59443796", "0.5932098", "0.59263486", "0.5916577", "0.5909102", "0.5875987", "0.58674955", "0.58159256", "0.5758879", "0.5749316", "0.5737786", "0.56859195", "0.5674865", "0.56575924", "0.559634", "0.5559205", "0.55494106", "0.55234504", "0.5512572", "0.5507064", "0.549094", "0.54819155", "0.54150045" ]
0.68096197
0
Remove a tag from a photo.
function photos_removeTag ($tag_id) { $response = $this->execute(array('method' => 'flickr.photos.removeTag', 'tag_id' => $tag_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_tag($tag);", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "public function remove($tag) { //+\n\t\tunset($this->arShortcodes[$tag]);\n\t}", "public function removeByTag($tag, $force = false);", "public function removeTag(string $name);", "function testRemoveTag_UsingCleanTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('something', 'another', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "function testRemoveTag_UsingMessyTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('some thing!', 'a-nother.', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "private function removeTag($tagName)\n\t{\n\t\tif (is_null($tagName) || $tagName == '') return;\n\n $tag = Tag::where('tag', '=', $tagName)->first();\n\n\t\tif (is_object($tag))\n\t\t{\n\t\t\tif ($tag->count > 0) TagUtil::decrementCount($tagName, 1, $tag);\n\n\t\t\t// return collection object\n\t\t\t$tagPivot = $this->tags()->wherePivot('tag_id', '=', $tag->id)->get();\n\t\t\t\n\t if ($tagPivot->count()) $this->tags()->detach($tag->id);\n\t\t}\n\t}", "public function removePhoto($value)\n {\n $key = array_search($value, $this->photos);\n if($key !== false) {\n unset($this->photos[$key]);\n }\n }", "public function removeAction() {\r\n if (empty($_POST['photo_id']))\r\n die('error');\r\n //GET PHOTO ID AND ITEM\r\n $photo_id = (int) $this->_getParam('photo_id');\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n $db = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n $photo->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "public function delTag($id, $tag)\n {\n $this->db->update(array('id'=>$id), array('$pull'=>array('tags'=>$tag)));\n }", "public function deleteTag($imageID, $tagName) {\n $sql = \"DELETE FROM t_tags_included WHERE fk_pk_tags=? AND fk_pk_bild_id=?\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"ss\", $tagName, $imageID);\n $select->execute();\n $select->close();\n }", "public static function deleteTag($name,$imageID)\n\t{\n\t\t$tag = Tag::getTagByName($name);\n\t\t$entry = DB::table('image_has_tag')->where(array('image_id' => $imageID, 'tag_id' => $tag->id));\n\t\t$entry->delete();\n\t\t\n\t\t$allEntries = DB::table('image_has_tag')->where(array('tag_id' => $tag->id))->get();\n\t\t\n\t\tif($allEntries == null) // Plus aucunes images n'utilisent ce tag, on le supprime de la bdd\n\t\t{\n\t\t\t$tag->delete();\n\t\t}\n\t}", "public function unTag($objid, $tag);", "public function delete($tag)\n {\n $builder = $this->git->getProcessBuilder()\n ->add('tag')\n ->add('-d');\n\n if (!is_array($tag) && !($tag instanceof \\Traversable)) {\n $tag = [$tag];\n }\n\n foreach ($tag as $value) {\n $builder->add($value);\n }\n\n $this->git->run($builder->getProcess());\n }", "public function remove()\n\t{\n\t\t$photosTable = PTA_DB_Table::get('Catalog_Product_Photo');\n\t\t$photos = (array)$photosTable->getPhotos($this->_id);\n\n\t\tif (parent::remove()) {\n\t\t\t$photoFileField = $photosTable->getFieldByAlias('photo');\n\t\t\tforeach ($photos as $photo) {\n\t\t\t\tPTA_Util::unlink(PTA_CONTENT_PATH . '/' . $photo[$photoFileField]);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function forget($tag)\n {\n $this->connection()->del($tag);\n }", "public function setRemoveTag($tag) {\n\t\t$this->removeTags[] = $this->trimTags($tag);\n\t}", "public function removeTag($tag){\n\n if (!$tag){\n return false;\n }\n if (is_string($tag)) {\n $tag = array($tag);\n }\n if (!count($tag)) {\n return false;\n }\n $deleteTags = array();\n\n foreach ($tag as $t) {\n $deleteTags[] = $this->_keyFromTag($t);\n $deleteKeys = $this->getKeysByTag($t);\n $this->remove($deleteKeys);\n }\n if ($deleteTags && count($deleteTags)) {\n $this->getAdapter()->delete($deleteTags);\n }\n return true;\n }", "public function removeTags()\n\t{\n\t\tforeach ($this->argsArray(func_get_args()) as $tag) {\n\t\t\t$this->removed_tags[] = $tag;\n\t\t}\n\t}", "public static function delete_tag($tag_id) {\n try {\n if ($tag_id > 0) {\n $tbl_tag = Tbl_tag::get_tag($tag_id);\n\n $db = ADODB::connect();\n $query = \"DELETE FROM tbl_tag_item WHERE tag_id=$tag_id\";\n $rs = $db->Execute($query);\n\n //Delete Image\n if ($tbl_tag->image) {\n if (file_exists(Page::get_abs_base().'/web/image/'.$tbl_tag->image)) {\n unlink(Page::get_abs_base().'/web/image/'.$tbl_tag->image);\n }\n }\n }\n } catch (exception $e) {\n Info::exception_handler($e, __file__, get_class($this), __FUNCTION__, __LINE__);\n }\n }", "public function removeTag($tag) {\n $this->init(); //we actually may do without it\n\n if (in_array($tag, $this->tags)) {\n $key = array_search($tag, $this->tags);\n $this->tags['del'][] = $key;\n unset($this->tags[$key]);\n\n return true;\n } else if (in_array($tag, $this->tags['new'])) {\n $key = array_search($tag, $this->tags['new']);\n unset($this->tags['new'][$key]);\n\n return true;\n }\n\n return false;\n }", "protected function removeKeyFromTag($key, $tag){\n return $this->getAdapter()->sRemove( $this->_keyFromId($key), $this->_keyFromTag($tag));\n }", "public function destroy(Photo $photo)\n {\n //\n }", "public function destroy(Photo $photo)\n {\n //\n }", "public function removeUpload()\n {\n $this->picture = null;\n }", "public function delete_photo(){\n $sql=\"DELETE FROM photos WHERE id=\".$this->id;\n self::$connect->query($sql);\n\n }", "function photosets_removePhoto ($photoset_id, $photo_id) {\n\t\t$params['method'] = 'flickr.photosets.orderSets';\n\t\t$response = $this->execute(array('method' => 'flickr.photosets.removePhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function removeTag($tag_name)\n\t{\n\t\t$tag = PortfolioTag::getTagByName($tag_name);\n\n\t\tif (!empty($tag)) // Это не должно произойти, тэг должен быть всегда найден\n\t\t{\n\t\t\t$command = Yii::app()->db->createCommand('DELETE FROM {{portfolio_portfolio_tag}} WHERE portfolio_id = :model_id AND tag_id = :tag_id');\n\n\t\t\t$command->bindValues(\n\t\t\t\tarray(\n\t\t\t\t\t':model_id' => $this->id,\n\t\t\t\t\t':tag_id' => $tag->id,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $command->execute();\n\t\t}\n\n\t\treturn false;\n\t}", "protected function _linkRemoveTag($tag)\n {\n return Horde::url('browse.php')\n ->add(array('actionID' => 'remove', 'tag' => $tag));\n }" ]
[ "0.7347097", "0.7204979", "0.6973377", "0.6935872", "0.69193196", "0.691541", "0.687112", "0.68704104", "0.6707652", "0.66968507", "0.66442585", "0.6489552", "0.6486538", "0.64394325", "0.6409692", "0.63596255", "0.63439107", "0.63427114", "0.6318437", "0.630769", "0.6304296", "0.63020086", "0.629941", "0.62540984", "0.62540984", "0.6185982", "0.6176129", "0.61470777", "0.6116263", "0.61133385" ]
0.74520034
0
Set one or both of the dates for a photo.
function photos_setDates ($photo_id, $date_posted = NULL, $date_taken = NULL, $date_taken_granularity = NULL) { $params = array(); $params['method'] = 'flickr.photos.setDates'; $params['photo_id'] = $photo_id; if ($date_posted) $params['date_posted'] = $date_posted; if ($date_taken) $params['date_taken'] = $date_taken; if ($date_taken_granularity) $params['date_taken_granularity'] = $date_taken_granularity; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDate($date);", "public function set_dates(){\n // if the id is not set, this means its anew item being created\n if(property_exists($this, 'created_on') && empty($this->id)){\n $this->created_on = date('Y-m-d H:i:s');\n }\n\n // if id is set, its an update\n if(property_exists($this, 'last_updated_on') && isset($this->id)){\n $this->last_updated_on = date('Y-m-d H:i:s');\n }\n }", "public function setDates($dates);", "public function setGalleryDate($newGalleryDate = null) : void {\n\t\t// base case: if the date is null, use the current date and time\n\t\tif($newGalleryDate === null) {\n\t\t\t$this->galleryDate = new \\DateTime();\n\t\t\treturn;\n\t\t}\n\n\t\t// store the like date using the ValidateDate trait\n\t\ttry {\n\t\t\t$newGalleryDate = self::validateDateTime($newGalleryDate);\n\t\t} catch(\\InvalidArgumentException | \\RangeException $exception) {\n\t\t\t$exceptionType = get_class($exception);\n\t\t\tthrow(new $exceptionType($exception->getMessage(), 0, $exception));\n\t\t}\n\t\t$this->galleryDate = $newGalleryDate;\n\t}", "public function setDate($value) {\n\t\t$this->_date = $value;\n\t}", "public function setDate($date){\n\t\t$this->date = $date;\n\t}", "private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}", "function set_exif_date($filename) {\n echo \" Setting date for $filename\\n\";\n $cmd = \"/usr/bin/exiftool -overwrite_original '-datetimeoriginal<filename' '$filename' 2>&1 1> /dev/null\";\n $results = shell_exec($cmd);\n if(strpos($results, 'looks more like a PNG') !== false) {\n $results = shell_exec(\"/usr/bin/mogrify -format jpg '$filename'\");\n $results = shell_exec($cmd);\n }\n }", "private function _setDate(){\n\t\tif($this->_year>=1970&&$this->_year<=2038){\n\t\t\t$this->_day = date('d', $this->_timestamp);\n\t\t\t$this->_month = date('m', $this->_timestamp);\n\t\t\t$this->_year = date('Y', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, true);\n\t\t\t$this->_day = sprintf('%02s', $dateParts['mday']);\n\t\t\t$this->_month = sprintf('%02s', $dateParts['mon']);\n\t\t\t$this->_year = $dateParts['year'];\n\t\t}\n\t\t$this->_date = $this->_year.'-'.$this->_month.'-'.$this->_day;\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setCreateDates(){\n $t = date_create(date('Y-m-d H:i:s'));\n $this->created = $t;\n $this->modified = $t;\n }", "public function set(Photo $photo)\n\t{\n\t\t$this->photo_id = $photo->id;\n\t\t$this->timestamps = false;\n\t\t// we set up the created_at\n\t\t$now = now();\n\t\t$this->created_at = $now;\n\t\t$this->updated_at = $now;\n\n\t\tforeach (self::VARIANT_2_INDICATOR_FIELD as $variant => $indicator_field) {\n\t\t\tif ($photo->{$indicator_field} !== null && $photo->{$indicator_field} !== 0 && $photo->{$indicator_field} !== '') {\n\t\t\t\t$this->create($photo, $variant, strval($now));\n\t\t\t}\n\t\t}\n\t}", "public function setDate($date)\n\t{\n\t\t$this->date = $date;\n\t}", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setDate($date) {\n $this->date = $date;\n }", "public function setDateDuJour()\n{\n$this->setDateSysteme(date(\"Y-m-d\"));\n$this->setDateUtilisateur(date(\"d/m/Y\"));\n}", "public\n\tfunction setPostDate($newPostDate = null): void {\n\t\t// base case: if the date is null, use the current date and time\n\t\tif($newPostDate === null) {\n\t\t\t$this->postDate = new \\DateTime();\n\t\t\treturn;\n\t\t}\n\n\n\n\t//store the like date using the ValidateDate trait\n\ttry {\n\t\t$newPostDate = self::validateDateTime($newPostDate);\n\t} catch(\\InvalidArgumentException |\\RangeException $exception) {\n\t\t$exceptionType = get_class($exception);\n\t\tthrow(new $exceptionType($exception->getMessage(), 0, $exception));\n\t}\n\t$this->postDate = $newPostDate;\n\n}", "public function setPropertyDate($date=true)\n {\n if($date === false)\n {\n $this->date =false;\n }\n elseif($date !== true)\n {\n $this->date =$date;\n }\n }", "public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}", "public function setDate($date = false)\n {\n $date = explode('-', $date);\n\n $day = @$date[2] ? : date('d');\n $month = @$date[1] ? : date('m');\n $year = @$date[0] ? : date('Y');\n\n $this->day = @$day;\n $this->month = @$month;\n $this->year = @$year;\n # return Calendar instance\n return $this;\n }", "public function set_date($date) \n\t{\n\t\tif(! is_numeric($date))\n\t\t{\n\t\t\t$date = strtotime($date);\n\t\t}\n\t\t\n\t\tif($this->version == ATOM)\n\t\t{\n\t\t\t$tag = 'updated';\n\t\t\t$value = date(DATE_ATOM, $date);\n\t\t} \n\t\telseif($this->version == RSS2) \n\t\t{\n\t\t\t$tag = 'pubDate';\n\t\t\t$value = date(DATE_RSS, $date);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$tag = 'dc:date';\n\t\t\t$value = date(\"Y-m-d\", $date);\n\t\t}\n\t\t\n\t\t$this->add_element($tag, $value); \n\t}", "private function _consolideDate(){\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}", "function setDate($date = null)\r\n\t{\t\r\n\t\t$day = substr($date ,8, 2);\r\n\t\t$month = substr($date ,5, 2);\r\n\t\t$year = substr($date ,0, 4);\r\n\t\t\r\n\t\t$newDate = $day.'-'.$month.'-'.$year;\r\n\t\t\r\n\t\treturn $newDate;\r\n\t}", "function setData($data)\n {\n $this->date=$data;\n }", "public function set_date_created( $date = null ) {\n\t\tglobal $wpdb;\n\n\t\tif ( ! is_null( $date ) ) {\n\n\t\t\t$datetime_string = wcs_get_datetime_utc_string( wcs_get_datetime_from( $date ) );\n\n\t\t\t// Don't use wp_update_post() to avoid infinite loops here\n\t\t\t$wpdb->query( $wpdb->prepare( \"UPDATE $wpdb->posts SET post_date = %s, post_date_gmt = %s WHERE ID = %d\", get_date_from_gmt( $datetime_string ), $datetime_string, $this->get_id() ) );\n\n\t\t\t$this->post->post_date = get_date_from_gmt( $datetime_string );\n\t\t\t$this->post->post_date_gmt = $datetime_string;\n\t\t}\n\t}", "public function setDate($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function setModDate($date) {}", "public function setDate($date_string = null)\n {\n\n if ($this->is_date() == 1) {\n $this->now = getdate(strtotime($date_string));\n } else {\n $this->now = getdate();\n }\n }" ]
[ "0.63447195", "0.6257269", "0.62071383", "0.59734637", "0.5961761", "0.5905391", "0.58734274", "0.58549273", "0.5837929", "0.58336574", "0.58336574", "0.58186644", "0.58182925", "0.57810664", "0.5757086", "0.5757086", "0.57568836", "0.570078", "0.55858594", "0.557147", "0.5562074", "0.5550414", "0.553638", "0.55278766", "0.54654574", "0.54495627", "0.54495114", "0.5405858", "0.540349", "0.53534865" ]
0.68128884
0
Set the meta information for a photo.
function photos_setMeta ($photo_id, $title, $description) { $response = $this->execute(array('method' => 'flickr.photos.setMeta', 'photo_id' => $photo_id, 'title' => $title, 'description' => $description)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function metaInit () {\n $this->imageMeta = new ImageMeta($this->getImagePath());\n $this->imageMeta->getMeta();\n }", "public function setMetaData($metaData);", "public function setMetaInfo($meta) {\n $this->meta = $meta;\n }", "protected function setup_metadata() {\n\t\tif ( $this->get_meta_type() ) {\n\t\t\t$this->fill( $this->get_metadata() );\n\t\t}\n\t}", "protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "protected function loadMetaInformation()\n {\n try {\n $logger = new Logger('exiftool');\n $reader = BookReader::create($logger);\n $metadataBag = $reader->files($this->file->getRealPath())->first();\n foreach ($metadataBag as $meta) {\n $tagName = $meta->getTag()->getName();\n if (0 === strcasecmp($tagName, 'MIMEType')) {\n $this->mime = $meta->getValue()->asString();\n }\n if (0 === strcasecmp($tagName, 'FileType')) {\n $this->ext = strtolower($meta->getValue()->asString());\n }\n if ($this->ext && $this->mime) {\n break;\n }\n }\n } catch (\\Exception $e) {\n $logger->addNotice($e->getMessage());\n }\n finally {\n $this->mime = empty($this->mime) ? $this->file->getMimeType() : $this->mime;\n $this->ext = empty($this->ext) ? $this->file->guessExtension(): $this->ext;\n }\n }", "public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }", "public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }", "function set_metadata($name, $value) {\n if ($name && $value)\n $this->metadata[$name] = $value;\n }", "public function setMetadata($metadata)\n\t{\n\t\t$this->vars['metadata'] = $metadata;\n\t}", "public function setPhoto(Photo $photoObject);", "protected function save_meta() {}", "public function setMeta($key, $value)\n {\n }", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "function setMetas($metas = array())\n\t{\n\t\t$defaultMetas = array('Robots'=>'all');\n\t\t$finalMetas = array_merge($defaultMetas,$metas);\n\t\t$metas = '';\n\t\tforeach($finalMetas as $name => $content)\n\t\t\t$metas .= '<meta name=\"'.$name.'\" content=\"'.htmlentities($content).'\" />';\n\t\t$this->setVar(\"meta\",$metas);\n\t}", "function photosets_editMeta ($photoset_id, $title, $description = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.editMeta';\n\t\t$params['photoset_id'] = $photoset_id;\n\t\t$params['title'] = $title;\n\t\tif ($description) $params['description'] = $description;\n\t\t$response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "public function setMeta(array $meta=null) {\n\t\t$this->meta = $meta;\n\t}", "public function setMetaInfo($data = array()) {\n $this->metaInfo = array_merge($this->metaInfo, $data);\n }", "public function set(Photo $photo)\n\t{\n\t\t$this->photo_id = $photo->id;\n\t\t$this->timestamps = false;\n\t\t// we set up the created_at\n\t\t$now = now();\n\t\t$this->created_at = $now;\n\t\t$this->updated_at = $now;\n\n\t\tforeach (self::VARIANT_2_INDICATOR_FIELD as $variant => $indicator_field) {\n\t\t\tif ($photo->{$indicator_field} !== null && $photo->{$indicator_field} !== 0 && $photo->{$indicator_field} !== '') {\n\t\t\t\t$this->create($photo, $variant, strval($now));\n\t\t\t}\n\t\t}\n\t}", "protected function setSubmittedMeta()\n {\n $this->setDataObject( new Tagline, 'tagline' );\n $this->content_obj->setMeta( 'tagline', $this->tagline->get() );\n \n $this->setImage( new Image, 'image_secondary' );\n if ( $this->image_secondary->get('file_name') ) {\n $this->content_obj->setMeta('image_secondary', $this->image_secondary->getFullName() );\n $this->processImage( 'image_secondary' );\n }\n \n $this->setDataObject( new Video, 'video' );\n $this->content_obj->setMeta( 'video', $this->video->get() );\n \n $this->setDataObject( new VideoDescription, 'video_description' );\n $this->content_obj->setMeta( 'video_description', $this->video_description->get() );\n \n $this->setDataObject( new SelectableCharity, 'selectable' );\n $this->content_obj->setMeta( 'selectable', $this->selectable->get() );\n \n $this->setDataObject( new Rank, 'rank' );\n $this->content_obj->setMeta( 'rank', $this->rank->get() );\n \n $this->setDataObject( new Url, 'url' );\n $this->content_obj->setMeta( 'url', $this->url->get() );\n }", "public function setMeta($name, $value)\n\t{\n\t\t$this->metaValues[$name] = $value;\n\t}", "public function setMeta(array $meta)\n {\n $this->meta = $meta;\n }", "public function setMetadata($metadata)\n {\n $this->metadata->set($metadata);\n }", "public function setMeta(array $meta = null)\n {\n $this->meta = $meta;\n }", "public function setMetaOgImageAttribute($value)\n {\n $this->attributes['meta_og_image'] = $value;\n\n if (empty($value)) {\n $this->attributes['meta_og_image'] = config('settings.meta_og_image');\n }\n }", "public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n }", "protected function setPhoto(string $photo)\r\n\t{\r\n\t\t$this->photo = $photo;\r\n\t}" ]
[ "0.70335853", "0.6956919", "0.6756647", "0.66268873", "0.65275466", "0.6520241", "0.6519575", "0.64917016", "0.6443167", "0.6443167", "0.63576895", "0.63283837", "0.62890506", "0.6256569", "0.62511647", "0.62334365", "0.6211461", "0.6210028", "0.61742383", "0.6169706", "0.6161191", "0.6131413", "0.6043135", "0.6031936", "0.60169", "0.6007673", "0.5982999", "0.59725136", "0.5968895", "0.5966519" ]
0.7007155
1
Set permissions for a photo.
function photos_setPerms ($photo_id, $is_public = 1, $is_friend = 0, $is_family = 0, $perm_comment = 3, $perm_addmeta = 3) { $response = $this->execute(array('method' => 'flickr.photos.setPerms', 'photo_id' => $photo_id, 'is_public' => $is_public, 'is_friend' => $is_friend, 'is_family' => $is_family, 'perm_comment' => $perm_comment, 'perm_addmeta' => $perm_addmeta)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPermissions($permissions) {}", "public function setPhotoAccess($value)\n {\n return $this->set('PhotoAccess', $value);\n }", "public function setPermissions($permissions);", "public function SetPermissions ($permissions);", "public function setObjectPermissions(array $permissions): void;", "public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "protected function setApplicationPermissions()\n\t{\n\t\t$base = $this->app['path.base'].'/';\n\t\t$app = str_replace($base, null, $this->app['path']);\n\t\t$storage = str_replace($base, null, $this->app['path.storage']);\n\t\t$public = str_replace($base, null, $this->app['path.public']);\n\n\t\t$this->setPermissions($app.'/database/production.sqlite');\n\t\t$this->setPermissions($storage);\n\t\t$this->setPermissions($public);\n\t}", "public function setPhotos($value)\n {\n $this->photos = $value;\n }", "public function setPostPhotoAttribute($value)\n {\n $attribute_name = \"PostPhoto\";\n $disk = \"uploads\";\n $destination_path = \"uploads/post_photo\";\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n\n\n }", "protected function setPermissions($filePath, $overrideFilePermissions)\n\t{\n\t\tif ($overrideFilePermissions) {\n\t\t\tchmod($filePath, $overrideFilePermissions & ~umask());\n\t\t}\n\t\telseif (is_null($overrideFilePermissions)) {\n\t\t\tchmod($filePath, 0666 & ~umask());\n\t\t}\n\t}", "public function setPhoto(Photo $photoObject);", "public function givePermission($permissions);", "function setFilePermission (string $path) : void {\n\n\tif (PHP_OS_FAMILY === \"Windows\") return;\n\t$iterator = null;\n\tif (!is_dir($path)) {\n\t\t$iterator = [$path];\n\t} else {\n\t\t$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));\n\t}\n\n\tforeach ($iterator as $item) {\n\t\t@chmod($item, octdec(getConfig(\"UNIX_FILE_PERMISSIONS\")));\n\t\t@chgrp($item, getConfig(\"UNIX_FILE_GROUP\"));\n\t}\n}", "protected function editLockPermissions() {}", "public function attachPermissions($permissions);", "final public function setPermission(int $value):void\n {\n $this->permission = $value;\n }", "public function testPostPermissionsToResource_addsPermissionCorrectly() {\r\n $this->jc->putResource('/', $this->test_folder);\r\n $resource = JasperTestUtils::createImage($this->test_folder);\r\n $this->jc->putResource('', $resource, dirname(__FILE__).'/resources/pitbull.jpg');\r\n $resource = $this->jc->getResource($resource->getUriString());\r\n $joeuser = $this->jc->getUsers('joeuser');\r\n $perms = $this->jc->getPermissions($resource->getUriString());\r\n\r\n $perm = new Permission('32', $joeuser[0], $resource->getUriString());\r\n $perms[] = $perm;\r\n $this->jc->updatePermissions($resource->getUriString(), $perms);\r\n\r\n $updated_perms = $this->jc->getPermissions($resource->getUriString());\r\n\r\n $this->jc->deleteResource($this->test_folder->getUriString());\r\n\r\n $this->assertEquals(sizeof($perms), sizeof($updated_perms));\r\n $this->assertEquals($perm->getPermissionMask(), $updated_perms[count($updated_perms)-1]->getPermissionMask());\r\n $this->assertEquals($perm->getPermissionRecipient(), $updated_perms[count($updated_perms)-1]->getPermissionRecipient());\r\n }", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"uploads\";\n $destination_path = \"products\";\n\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n }", "public function setPermissions(array $permissions = [])\n {\n $this->setType($permissions['users'][$this->user()->name] ?? null);\n $this->permissions = $permissions['permissions'][$this->type];\n }", "protected function setApplicationPermissions()\n {\n $files = (array) $this->rocketeer->getOption('remote.permissions.files');\n foreach ($files as &$file) {\n $this->setPermissions($file);\n }\n\n return true;\n }", "public function setPhoto($photo)\n {\n // First checking for extension validity, including default value - default values are set before we approach setting ones passed by data array\n if(!in_array($photo, $this->extensions)) {\n // If extension is invalid we throw descriptive exception\n throw new Exception('Extension specified is not valid');\n }\n // if photo extension equals default value it's final value (which will be the path) is set to defined default value\n if($photo == self::DEFAULT_TEXT) {\n $this->_values['photo'] = self::PHOTO_FOLDER . self::DEFAULT_IMAGE;\n } else {\n // If everything is right and we got extension of the file from the database, we are setting up a link to photo\n $this->_values['photo'] = self::PHOTO_FOLDER . $this->_values['id'] . \".\" . $photo;\n }\n }", "public function setPhoto($photo)\n {\n // First checking for extension validity, including default value - default values are set before we approach setting ones passed by data array\n if(!in_array($photo, $this->extensions)) {\n // If extension is invalid we throw descriptive exception\n throw new Exception('Extension specified is not valid');\n }\n // if photo extension equals default value it's final value (which will be the path) is set to defined default value\n if($photo == self::DEFAULT_TEXT) {\n $this->_values['photo'] = self::PHOTO_FOLDER . self::DEFAULT_IMAGE;\n } else {\n // If everything is right and we got extension of the file from the database, we are setting up a link to photo\n $this->_values['photo'] = self::PHOTO_FOLDER . $this->_values['id'] . \".\" . $photo;\n }\n }", "public function is_allowed_to_set_content_object_rights();", "public function setIdentityCardPhotosAttribute($value)\n {\n $attribute_name = \"identity_card_photos\";\n $disk = 'contects';\n $destination_path = \"contects/images\";\n\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n }", "public function givePermission($permission);", "public function givePermission($permission);", "function set_permissions($permessi_abilitati)\n {\n $permissions_data=$this->config->item(\"permissions\");\n $permissions_data=array_reverse($permissions_data['mask'],true);\n\n foreach($permissions_data as $value)\n {\n if(in_array($value,array_keys($permessi_abilitati)))\n $this->_permissions[$value]=$permessi_abilitati[$value];\n else\n $this->_permissions[$value]=false;\n }\n\n $bitmask=$this->to_bitmask($this->_permissions);\n return($bitmask);\n }", "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::permissions([\n 'create',\n 'read',\n 'update',\n 'delete',\n ]);\n }", "public function setPhoto(string $photo): void\n {\n $this->photo = $photo;\n }" ]
[ "0.65165776", "0.6263768", "0.6248518", "0.6239904", "0.6045777", "0.5961811", "0.5930788", "0.5808552", "0.57129014", "0.56097484", "0.55647796", "0.5544397", "0.5507477", "0.54466844", "0.5418625", "0.54142654", "0.53981376", "0.53898114", "0.5372746", "0.53506577", "0.53106105", "0.5287578", "0.5287578", "0.5286442", "0.5268198", "0.5219087", "0.5219087", "0.51913226", "0.5144686", "0.5139572" ]
0.66612005
0
Set the safety level of a photo.
function photos_setSafetyLevel ($photo_id, $safety_level = 1, $hidden = 0) { $response = $this->execute(array('method' => 'flickr.photos.setSafetyLevel', 'photo_id' => $photo_id, 'safety_level' => $safety_level, 'hidden' => $hidden)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLevel($level);", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "public function setLevel($level);", "public function set_level($value) {\n\t\tif (is_anint($value)) {\n\t\t\t$this->init_from_type_and_level($this->type, $value);\n\t\t}\n\t}", "public function setCover($value)\n {\n if (!array_key_exists('cover', $this->fieldsModified)) {\n $this->fieldsModified['cover'] = $this->data['fields']['cover'];\n } elseif ($value === $this->fieldsModified['cover']) {\n unset($this->fieldsModified['cover']);\n }\n\n $this->data['fields']['cover'] = $value;\n }", "public function setCoverAttribute($value) {\n\n\t\tif (!$this->preventAttrSet) {\n\t\t\t$field_name = 'profile.cover';\n\t\t\t$attribute_name = 'cover';\n\t\t\t$disk = config('filesystems.default');\n\n\t\t\t// Set the right field name\n\t\t\t$request = \\Request::instance();\n\t\t\tif (!$request->hasFile($field_name)) {\n\t\t\t\t$field_name = $attribute_name;\n\t\t\t}\n\n\t\t\t// if (!isset($this->country_code) || !isset($this->user_id)) {\n\t\t\t// $this->attributes[$attribute_name] = null;\n\t\t\t// return false;\n\t\t\t// }\n\n\t\t\t// Path\n\t\t\t$destination_path = 'profile/cover/'. $this->user_id;\n\n\t\t\t// Upload\n\t\t\t$this->uploadFileToDiskCustom($value, $field_name, $attribute_name, $disk, $destination_path);\n\t\t} else {\n\t\t\t$this->attributes['cover'] = $value;\n\t\t}\n\t}", "public function initializeSecurityLevel() {\n\t\t// Standart level (GREEN).\n\t\t$this->securityLevel = self::SECURITYLEVEL_GREEN;\n\n\n\t\tif($this->XSSReport !== false) {\n\t\t\t$xssSecurityLevel = $this->XSSReport->getSecurityLevel();\n\t\t\tif($xssSecurityLevel < $this->securityLevel)\n\t\t\t\t$this->securityLevel = $xssSecurityLevel;\n\t\t}\n\t\t\t\n\t\tif($this->SQLInjectionReport !== false) {\n\t\t\t$sqlinjSecurityLevel = $this->SQLInjectionReport->getSecurityLevel();\n\t\t\tif($sqlinjSecurityLevel < $this->securityLevel)\n\t\t\t\t$this->securityLevel = $sqlinjSecurityLevel;\n\t\t}\n\t\t\t\n\t}", "function setImage( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n \n if ( get_class( $value ) == \"ezimage\" )\n {\n $this->ImageID = $value->id();\n }\n elseif( is_numeric( $value ) )\n {\n $this->ImageID = $value;\n }\n }", "public function setLevel($level) {\n $this->level = $level;\n }", "public function setMinDamage(){ $this->minDamage = 10; }", "public function SetLevel($level)\n {\n $this->level = $level;\n }", "function setCompatibilityLevel($value)\n {\n $this->_props['CompatibilityLevel'] = $value;\n }", "private function setLevel()\n\t{\n\t\t$level_count = $this->db->cacheGetOne(\"SELECT COUNT(*) FROM `bin_level` WHERE 1\");\n\t\tif ($level_count > 1) // binary level\n\t\t{\n\t\t\t$this->levelType = 1;\n\t\t\t$this->levelArr = $this->db->getAssoc(\"SELECT `id`, `name` FROM `bin_level` WHERE 1\");\n\t\t}else{\n\t\t\t$level_count = $this->db->cacheGetOne(\"SELECT COUNT(*) FROM `bin_serial_type` WHERE 1\");\n\t\t\tif ($level_count > 1)\n\t\t\t{\n\t\t\t\t$this->levelType = 2;\n\t\t\t\t$this->levelArr = $this->db->getAssoc(\"SELECT `id`, `name` FROM `bin_serial_type` WHERE 1\");\n\t\t\t}else{\n\t\t\t\t$level_count = $this->db->cacheGetOne(\"SELECT COUNT(*) FROM `bbc_user_group` WHERE `is_admin`=0\");\n\t\t\t\tif ($level_count > 2) // user group level\n\t\t\t\t{\n\t\t\t\t\t$this->levelType = 3;\n\t\t\t\t\t$this->levelArr = $this->db->getAssoc(\"SELECT `id`, `name` FROM `bbc_user_group` WHERE `is_admin`=0\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function setPhotoAccess($value)\n {\n return $this->set('PhotoAccess', $value);\n }", "public function setEscalationLevel($value)\n {\n $this->setItemValue('escalation_level', ['id' => (int)$value]);\n }", "public function setLevel(int $level) {\n\n $this->level = $level;\n\n }", "static function changePhoto() {\n\t\t\n\t\t$case_intra = rcube_utils::get_input_value('photo_intra', RCUBE_INPUT_POST);\n\t\t$case_ader = rcube_utils::get_input_value('photo_ader', RCUBE_INPUT_POST);\n\n\t\t$info = array();\n\t\tif ( !empty($case_intra) && $case_intra == '1') {\n\t\t\t$info['mineqpublicationphotointranet'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotointranet'] = 0;\n\t\t}\n\t\t\n\t\tif ( !empty($case_ader) && $case_ader == '1' && !empty($case_intra) && $case_intra == '1')\n\t\t{\n\t\t\t$info['mineqpublicationphotoader'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotoader'] = 0;\n\t\t}\n\t\t\t\n\t\t$user_infos = melanie2::get_user_infos(Moncompte::get_current_user_name());\n\t\t\n\t\t$user_dn = $user_infos['dn'];\n\t\t$password = rcmail::get_instance()->get_user_password();\n\t\t\n\t\t$auth = Ldap::GetInstance(Config::$MASTER_LDAP)->authenticate($user_dn, $password);\n\t\t\n\t\tif(Ldap::GetInstance(Config::$MASTER_LDAP)->modify($user_dn, $info)) {\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_ok', 'melanie2_moncompte'), 'confirmation');\n\t\t} else {\n\t\t\t$err = Ldap::GetInstance(Config::$MASTER_LDAP)->getError();\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_nok', 'melanie2_moncompte') . $err, 'error');\n\t\t}\n\t\t\n\t}", "public function setVolume(int $volume): void // changing visibility level\n {\n parent::setVolume(volume: $volume); // uses only \"Abstraction\", not \"Implementor\"\n }", "public function setPower()\n {\n $this->_role->power = 200;\n }", "public function setPhoto(Photo $photoObject);", "public function setIllumination($value) {\n $this->illuminate = $value;\n }", "public function setLevel($level) \n {\n $level = abs(filter_var($level, FILTER_SANITIZE_NUMBER_INT));\n if($level < 1 || $level > 12)\n {\n throw new Exception('Level must be between 1, 12');\n } else {\n $this->level = $level;\n }\n }", "public function setPower()\n {\n $this->_role->power = 100;\n }", "public function setProtect($value) {\n\t}", "public function setImageAttribute($value)\n {\n $attribute_name = \"photo\";\n $disk = \"uploads\";\n $destination_path = \"images/\";\n $this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path);\n }", "protected function setToLowestQuality(): void\n {\n $this->getItem()->quality = $this->getLowestQuality();\n }", "public function set(Photo $photo)\n\t{\n\t\t$this->photo_id = $photo->id;\n\t\t$this->timestamps = false;\n\t\t// we set up the created_at\n\t\t$now = now();\n\t\t$this->created_at = $now;\n\t\t$this->updated_at = $now;\n\n\t\tforeach (self::VARIANT_2_INDICATOR_FIELD as $variant => $indicator_field) {\n\t\t\tif ($photo->{$indicator_field} !== null && $photo->{$indicator_field} !== 0 && $photo->{$indicator_field} !== '') {\n\t\t\t\t$this->create($photo, $variant, strval($now));\n\t\t\t}\n\t\t}\n\t}", "public function setIntensity($intensity) {}", "function setIssueLevel( $sessionID, $issueID, $level ){\r\n\t \tif($this->userCanSetIssueLevel( $sessionID, $issueID )){\r\n\t \t\t$userID = $_SESSION[ 'userid' ];\r\n\t\t\t$this->sendIssueAlerts($issueID, 'Issue level changed.');\r\n\t\t\t$query=\"UPDATE issues SET Modifier='$userID', Level='$level' WHERE ID='$issueID'\";\r\n\t\t\t$result=mysql_query($query);\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t}", "public function setImageMainAttribute($value)\n {\n $attribute_name = \"image_main\";\n $this->saveImageNormally($attribute_name, $value);\n }" ]
[ "0.5569952", "0.5566912", "0.52600574", "0.5245245", "0.5139422", "0.50750405", "0.5073039", "0.5030286", "0.49861702", "0.49638963", "0.4949922", "0.49089298", "0.4855177", "0.48063585", "0.4759778", "0.47478795", "0.4747587", "0.47459194", "0.47209734", "0.47175965", "0.47132465", "0.47014716", "0.47009438", "0.46929023", "0.46896267", "0.46882755", "0.46839193", "0.46286592", "0.46266782", "0.46201408" ]
0.7159577
0
Set the tags for a photo.
function photos_setTags ($photo_id, $tags) { $response = $this->execute(array('method' => 'flickr.photos.setTags', 'photo_id' => $photo_id, 'tags' => $tags)); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_tags($tags) {\n $this->tags = $tags;\n }", "protected function setTags()\n {\n $this->authBasedTag();\n $this->nameBasedTag($this->relatedEntities);\n }", "public function setTags($tags)\n {\n $this->_tags = $tags;\n }", "public function setTags(Collection $tags)\n {\n throw new \\RuntimeException('Settings tags on an ImageVariant is not supported.', 1371237597);\n }", "function setTags($photo_id = false){\n\n\t\t/* Lets get some tags */\n\t\tif($photo_id){\n\n\t\t\t/* This is used on Photo Page */\n\t\t\t$tags = $this->getTags($photo_id);\n\n\t\t\t/* Start Output */\n\t\t\t$output = '';\n\t\t\tforeach($tags->photo->tags->tag as $tag){\n\t\t\t\t$output .= $tag->raw.', ';\n\t\t\t}\n\t\t} else {\n\t\t\t/* This is used on photo page */\n\t\t\t$tags = $this->getUserTags();\n\n\t\t\t/* Start Output */\n\t\t\t$output = '';\n\t\t\tforeach($tags->who->tags->tag as $tag){\n\t\t\t\t$output .= $tag->_content.', ';\n\t\t\t}\n\t\t}\n\n\t\t/* Sets global var */\n\t\t$this->tags = $output;\n\t\treturn $output;\n\t}", "public function setShowTags(SetAlbumTagsRequest $request): void\n\t{\n\t\t$request->album()->show_tags = $request->tags();\n\t\t$request->album()->save();\n\t}", "protected function setTags()\n {\n /*todo check role and flush based on tags*/\n $this->authBasedTag();\n }", "public function setPhotos($value)\n {\n $this->photos = $value;\n }", "public function setTags($tags)\n {\n $this->tags = is_array($tags) ? new ArrayCollection($tags) : $tags;\n }", "public function setTags($tags)\n {\n $this->tags = $tags;\n }", "public function setTags($tags)\n {\n $this->tags = $tags;\n }", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "public function setTagsFor($objectid, $tags) {\n $prevTags = $this->getTagsFor($objectid);\n if( !$prevTags ) {\n $prevTags = array();\n }\n $delTags = array_diff($prevTags, $tags);\n $insTags = array_diff($tags, $prevTags);\n\n $this->deleteTagsFor($objectid, $delTags);\n $this->addTagsFor($objectid, $insTags);\n }", "public function setPhoto(Photo $photoObject);", "public function setTags($value)\n {\n if (!array_key_exists('tags', $this->fieldsModified)) {\n $this->fieldsModified['tags'] = $this->data['fields']['tags'];\n } elseif ($value === $this->fieldsModified['tags']) {\n unset($this->fieldsModified['tags']);\n }\n\n $this->data['fields']['tags'] = $value;\n }", "public function setTags($t)\n\t{\n\t\tif (is_array($t)) {\n\t\t\t$this->tags = $t;\n\t\t}\n\t}", "public function setPhoto(string $photo): void\n {\n $this->photo = $photo;\n }", "public function setTags($newVal) {\n $this->tags = $newVal;\n }", "public function setTags(array $tags)\n\t{\n\t\t$this->clearTags();\n\n\t\tforeach ($tags as $tagName => $tagReference) {\n\t\t\t$this->addTag($tagName, $tagReference);\n\t\t}\n\t}", "public function setTags( ArrayCollection $tags )\n {\n $this->tags = $tags;\n }", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"uploads\";\n $destination_path = \"products\";\n\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n }", "public static function setTags(array $tags, bool $override = false): void\n {\n foreach ($tags as $name => $value) {\n static::setTag($name, $value, $override);\n }\n }", "public function setTags($tags) {\n\t\tTemplate::setSiteMetaTags($tags);\n\t}", "public function setTags($tags)\n {\n// $this->tags = is_array($tags) ? new ArrayCollection($tags) : $tags;\n $this->tags->clear();\n foreach($tags as $tag) {\n $this->tags->add($tag);\n }\n return $this;\n }", "public function set(Photo $photo)\n\t{\n\t\t$this->photo_id = $photo->id;\n\t\t$this->timestamps = false;\n\t\t// we set up the created_at\n\t\t$now = now();\n\t\t$this->created_at = $now;\n\t\t$this->updated_at = $now;\n\n\t\tforeach (self::VARIANT_2_INDICATOR_FIELD as $variant => $indicator_field) {\n\t\t\tif ($photo->{$indicator_field} !== null && $photo->{$indicator_field} !== 0 && $photo->{$indicator_field} !== '') {\n\t\t\t\t$this->create($photo, $variant, strval($now));\n\t\t\t}\n\t\t}\n\t}", "public function setPostPhotoAttribute($value)\n {\n $attribute_name = \"PostPhoto\";\n $disk = \"uploads\";\n $destination_path = \"uploads/post_photo\";\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n\n\n }", "protected function setPhoto(string $photo)\r\n\t{\r\n\t\t$this->photo = $photo;\r\n\t}", "public function setTag($value)\n {\n if ($value !== null) {\n $this->_params['tag'] = $value;\n } else {\n unset($this->_params['tag']);\n }\n }", "function add_tags($tags) {\n array_merge($this->tags, $tags);\n }", "public function setTags($tagList)\r\n {\r\n $this->data['props']['taglist'] = implode(',', $tagList);\r\n }" ]
[ "0.6933218", "0.6773757", "0.67190623", "0.6684508", "0.6675219", "0.65931046", "0.65151954", "0.64920187", "0.64876664", "0.6467937", "0.6467937", "0.6242587", "0.6183994", "0.61774826", "0.6142818", "0.6123194", "0.607157", "0.60697037", "0.60673213", "0.6052014", "0.60146946", "0.597668", "0.5961052", "0.5936439", "0.5920155", "0.58645135", "0.58439", "0.58192337", "0.57788956", "0.5727384" ]
0.6941952
0
/ Photosets methods Add a photo to the end of an existing photoset.
function photosets_addPhoto ($photoset_id, $photo_id) { $response = $this->execute(array('method' => 'flickr.photosets.addPhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addPhoto($value)\n {\n $this->photos[] = $value;\n }", "abstract public function addItems(\\Media\\Entity\\Photo\\PhotoBase $item);", "public function addPhotoAction(){\n $data = $this->getRequestData();\n $types = array('activity', 'operation', 'people');\n if(isset($data['photo']['name']) && isset($data['photo']['content']) && isset($data['type']) && in_array($data['type'], $types)){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $folder = Asset_Folder::getByPath('/images/'.$data['type'].'/'.$user->getKey().'-'.$data['type']);\n if (!$folder) {\n switch($data['type']){\n case 'activity':\n $fid = 3;\n break;\n case 'operation':\n $fid = 4;\n break;\n case 'people':\n $fid = 7;\n break;\n }\n $folder = new Object_Folder();\n $folder->setKey($user->getKey() . \"-\" . $data['type']);\n $folder->setParentId($fid);\n $folder->save();\n }\n\n $asset = new Asset_Image();\n $asset->setCreationDate(time());\n $asset->setUserOwner(1);\n $asset->setUserModification(1);\n $asset->setParentId($folder->getId());\n $asset->setFilename(Pimcore_File::getValidFilename($data['name'] . \"-\" . time()));\n $asset->setData(base64_decode($data['content']));\n if(!$asset->save()){\n $this->setErrorResponse('cannot save photo!');\n }\n } else {\n $this->setErrorResponse('photo and type is mandatory for this request!');\n }\n\n $this->_helper->json(array('photo' => $asset->getId()));\n }", "function add_photo($photo, $gallery) {\n\n $photo_post = array();\n $photo_post['post_title'] = $photo['title'];\n $photo_post['post_content'] = '';\n $photo_post['post_type'] = 'attachment';\n $photo_post['post_status'] = 'publish';\n $photo_post['post_author'] = $this->flickr_author;\n $photo_post['post_category'] = array($this->flickr_category, );\n $photo_post['post_mime_type'] = 'image/jpeg'; //assuming jpeg, is this ok?\n $photo_post['post_parent'] = $gallery['pageid'];\n if ($photo['url_o']) {\n $photo_post['guid'] = $photo['url_o']; //magically linking the photo\n } else {\n $photo_post['guid'] = $photo['url_m']; //for some reason url_o isnt always available\n }\n \n //$postid = wp_insert_post($photo_post);\n $postid = wp_insert_attachment($photo_post);\n /* Update metadata now */\n $this->set_metadata($postid, $photo);\n\n //now tag with mediatags\n wp_set_object_terms($postid, array($gallery['mediatag']), MEDIA_TAGS_TAXONOMY);\n\n //and we should be done. Horay!\n}", "private function _add_photo(){\n global $db;\n\n $photo_name = $db->quote($this->_photo_name);\n $photo_caption = $db->quote($this->_photo_caption);\n $file_name = $db->quote($this->_file_name);\n $file_type = $db->quote($this->_file_type);\n\n $sql = \"SELECT * FROM photos WHERE file_name = \".$file_name.\" LIMIT 1\";\n\n // if photo with file name $file_name is not present in database, insert into database\n if(!$db->query1($sql)->rowCount()){\n $sql = \"INSERT INTO photos (\";\n $sql .= \"photo_name, photo_caption, file_name, file_size, file_type, user_id\";\n $sql .= \") VALUES ( \";\n $sql .= $photo_name .\", \". $photo_caption .\", \". $file_name.\", \". $this->_file_size .\", \". $file_type.\",\" .$this->_user_id;\n $sql .= \")\";\n try {\n //adding photo to db\n $db->exec($sql);\n return \"Photo with name \".$photo_name.\" added, query Successful.\";\n } catch (Exception $e) {\n throw $e;\n }\n }\n else{\n throw new Exception(\"The file name \".$file_name. \" alrady exists\");\n }\n }", "public function addImage(ImageMedia $image);", "public function addPhoto()\n\t{\n\t\t// check if any key in request is of error type\n\t\tif ($this->request->hasKey(ErrorEnum::ERROR))\n\t\t{\n\t\t\t// setting general error message and view style for a template\n\t\t\t$this->view->add_new_photo_message_class = ErrorEnum::ERROR;\n\t\t\t$this->view->add_new_photo_message = MessageBundle::getMessage('form.validation.field.addphoto.noimage.exists');\n\t\t\t\n\t\t\tif ($this->request->hasKey(ErrorEnum::FILENOIMAGE))\n\t\t\t{\n\t\t\t\t$this->view->add_new_photo_message = MessageBundle::getMessage('form.validation.field.addphoto.filenoimage');\n\t\t\t}\n\t\t}\n\t\t$this->view->add_to_existing_album = $this->helper->getExistingAlbumsToForm();\n\t\t$this->view->show('profile_gallery_add');\n\t}", "public function addPhoto(ProductPhoto $ProductPhoto) {\n return $this->photos()->save($ProductPhoto);\n }", "public function addPicture()\n {\n\n $flags = $this->language->getAllDataNoPagination();\n $id = Input::get('id');\n $page = $this->photoGallery->getDataById($id);\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n\n return view('cms.modules.multicms.photoGallery_addpic', compact('page', 'flags'), $data);\n }", "public function addPhoto($file){\r\n\t\t$XMLObject = $this->getXMLObject();\r\n\t\tif($uid = $this->access->getUserId()){\r\n\t\t\t$img = new Image($file);\r\n\t\t\tif($img->isImage()){\r\n\t\t\t\t$w = $img->getWidth();\r\n\t\t\t\t$h = $img->getHeight();\r\n\t\t\t\t$d = $img->getDimensions($w, $h);\r\n\t\t\t\t$query = 'INSERT INTO blog_photos (user_id, width, height) VALUES ('.(int)$uid.', '.$d['width'].', '.$d['height'].')';\r\n\t\t\t\tif(DB::query($query)){\r\n\t\t\t\t\t$bln_success = FALSE;\r\n\t\t\t\t\t$pid = DB::insertId();\r\n\t\t\t\t\t//create image:\r\n\t\t\t\t\tif($img->output(MAX_PHOTO_WIDTH_THUMB, MAX_PHOTO_WIDTH_THUMB, Utils::getPhotoPath($uid,$pid,'thumb','blog'))){//Thumb\r\n\t\t\t\t\t\tif($img->output(MAX_PHOTO_WIDTH_MEDIUM, MAX_PHOTO_HEIGHT_MEDIUM, Utils::getPhotoPath($uid,$pid,'medium','blog'))){//Medium\r\n\t\t\t\t\t\t\tif($img->output(MAX_PHOTO_WIDTH_LARGE, MAX_PHOTO_HEIGHT_LARGE, Utils::getPhotoPath($uid,$pid,'large','blog'))){//Large\t\r\n\t\t\t\t\t\t\t\t$bln_success = TRUE;\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\r\n\t\t\t\t\tif(!$bln_success){\r\n\t\t\t\t\t\t$this->removePhoto($pid);\r\n\t\t\t\t\t\tparent::throwError($img->errorNo, $img->errorMessage);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else $this->throwError(7);\r\n\t\t\t}else parent::throwError($img->errorNo, $img->errorMessage);\r\n\t\t\t$img->destroy();\r\n\t\t}else $this->throwError(10);\r\n\t\treturn $XMLObject;\r\n\t}", "public function add_pic() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['add_pic']) && !empty($_POST['add_pic'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if ($this->_model->addPicture($_POST['picture'])) {\n $this->_model->setFlash(\"add_success\", \"Photo ajoutée avec succès!\");\n $this->redirect(\"/montage\");\n }\n }\n }\n $this->_model->setFlash(\"add_error\", \"Erreur lors de l'ajout de votre photo!\");\n $this->redirect(\"/montage\");\n }", "public function addPhoto($paramsPhoto)\n {\n return DB::table('photos')->insert(\n [\n 'photos_link' => trim(strip_tags($paramsPhoto['link'])),\n 'album_id' => trim(strip_tags($paramsPhoto['albumId'])),\n ]\n ); }", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "private function addProductPhotos(array $request){\n\n if(array_key_exists('photos', $request)){\n \n foreach($request['photos'] as $photos){\n\n $photo = new Photo();\n\n $photoProduct = Product::where('name', $request['name'])->get();\n $path = $photos->store('/storage/products');\n $filename = basename($path);\n $extension = $photos->getClientOriginalExtension();\n \n $photo->product_id = $photoProduct[0]->id; \n $photo->path = $filename;\n $photo->extension = $extension;\n\n $photo->save();\n }\n }\n }", "protected function addPhoto($remote_id, $item)\n {\n if( !empty($item['photos']) )\n {\n $photos = array_filter(array_map('trim', explode(';', $item['photos'])));\n $needCover = true;\n $i = 1;\n foreach($photos as $photoUrl)\n {\n $image_type = 0;\n if($needCover)\n {\n $image_type = 1;\n $needCover = false;\n }\n $this->photos[$remote_id][($image_type === 1)? 'cover':$i] = [\n 'url' => $photoUrl,\n 'image_type' => $image_type,\n 'size' => 'original',\n 'associated_type' => Spot::class,\n 'created_at' => $this->date,\n 'updated_at' => $this->date\n ];\n $i++;\n }\n }\n }", "public function addImage(Image $image){\n $this->images->add($image);\n }", "protected function addMediaGallery($productCollection) {\n $ids = array(); \n $products = array();\n foreach($productCollection as $product) {\n $ids[] = $product->getId();\n $products[$product->getId()] = $product;\n }\n if(!$ids) return false;\n \n \n $table = $productCollection->getTable(Mage_Catalog_Model_Resource_Product_Attribute_Backend_Media::GALLERY_TABLE);\n $adapter = $productCollection->getConnection();\n \n $select = $adapter->select()->from($table)->where('entity_id IN (?)',$ids);\n $rows = $adapter->query($select)->fetchAll();\n\n foreach($rows as $row) {\n $product = $products[$row['entity_id']];\n \n $images = (array)$product->getData('images');\n if($row['value']) {\n $images[] = $row['value'];\n }\n $product->setData('images',$images);\n }\n //echo $select.PHP_EOL;\n \n \n \n \n }", "public function addImage($url, $attributes = []);", "public function addRelatedImage(Request $request, $id)\n {\n Validator::make($request->all(), [\n 'photos.*' => \"file|image|mimes:jpeg,png,jpg,gif,svg|max:5000\"\n ])->validate();\n $product = Product::find($id);\n $lastID = DB::table('products_photos')->latest('id')->first()->id;\n\n // Store related images into Storage/app\n $arr_img = [];\n if ($photos = $request->file('photos')) {\n $i = $lastID + 1;\n foreach ($photos as $photo) {\n $photoExt = $photo->getClientOriginalExtension();\n $photoName = $product['name'] . \"_\" . $i . \".\" . $photoExt;\n $photo->move(base_path('storage/app/public/product_images'), $photoName);\n $arr_img[] = $photoName;\n $i++;\n }\n }\n // Insert database\n foreach ($arr_img as $key => $value) {\n $insertPhoto = DB::table('products_photos')->insert(\n ['product_id' => $id, 'photos' => $value]\n );\n }\n\n return redirect()->route(\"adminAddRelatedImageForm\",$id)->withSuccess('Related Images has already inserted');\n }", "public function add($data)\n {\n return PhotoGalleryLg::create($data);\n }", "public function add(array $images, $mode = self::DUPLICATES_IGNORE) {\n foreach ($images as $id => $image) {\n if (!(isset($this->_images[$id]) && $mode == self::DUPLICATES_IGNORE)) {\n $this->_images[$id] = $image;\n }\n }\n }", "public function add_image_post() {\n $itemId = $this->input->post('item_id');\n $uploadResult= $this->upload();\n if ($uploadResult['upload'] === 'ok') {\n $fileData = $uploadResult['fileData'];\n $updatePayload = array(\n 'photo' => $fileData['file_name']\n );\n $res = $this->model->update($itemId, $updatePayload);\n return $this->response(\n array(\n \"status\" => \"ok\",\n \"result\" => $res\n ),\n parent::HTTP_ACCEPTED\n );\n\n }else{\n return $this->response(\n array( 'status' => 'UPLOADING FAILED', \n 'code' => '200', \n 'message' => $uploadResult['err']), \n parent::HTTP_BAD_GATEWAY );\n }\n }", "public function addimage($newitem)\n\t{\n\t\t// check if the inserted item is an image\n\t\tif(!is_a($newitem,'ImageItem'))\n\t\t\tthrow new Exception('ImageItem type was expected.');\n\t\t// insert image\n\t\tarray_push($this->collection, $newitem);\n\t}", "public function upload_photo(){\n $sql=\"INSERT INTO photos \";\n $sql.=\"(name,size,type,date,img_navigacija_id) VALUES ('{$this->name}',$this->size,'{$this->type}',NOW(),2)\";\n self::$connect->query($sql);\n\n\n }", "function addFileSet(FileSet $fileset)\n\t{\n\t\t$this->filesets[] = $fileset;\n\t}", "public function addImages(array $urls);", "function addPhotoToDatabase($photo) {\n global $db_dsn, $db_username, $db_password;\n\n $date = date('d-m-Y');\n $albumName = getCategoryAlbumNames()[1];\n\n $dbh = new PDO($db_dsn, $db_username, $db_password);\n $sql = \"INSERT INTO photos (photo_name, photo_album, date_of_creation) \"\n . \"VALUES ('$photo', '$albumName', '$date')\";\n $q = $dbh->prepare($sql);\n $q->execute();\n}", "public function addPhoto(FlyerPhoto $FlyerPhoto) {\n return $this->photos()->save($FlyerPhoto);\n }", "public function photosAdd($id, PhotosRequest $photosrequest){\n\n $directory = '/uploads/photos/'.$id;\n\n if (!File::exists(public_path().$directory)){\n File::makeDirectory(public_path().$directory, 0775,true);\n }\n\n $files = $photosrequest->file('file');\n\n\n\n foreach ($files as $file) {\n\n $name = Auth::id().'_'.$id.'_'.str_slug(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME),'-').rand(1000,9999);\n $name_thumb = 'thumb_'.$name;\n $name_thumb2 = 'thumb2_'.$name;\n $file_path = $name.'.'.$file->getClientOriginalExtension();\n\n $img = Image::make($file);\n $img->interlace();\n $img->save('uploads/photos/'.$id.'/' . $name .'.'. $file->getClientOriginalExtension());\n\n $img->fit(200, 200);\n $img->save('uploads/photos/'.$id.'/' . $name_thumb .'.'. $file->getClientOriginalExtension());\n\n $img = Image::make($file);\n $img->resize(180, null, function($constraint){\n $constraint->aspectRatio();\n });\n $img->save('uploads/photos/'.$id.'/' . $name_thumb2 .'.'. $file->getClientOriginalExtension());\n\n $picture = new Pictures();\n\n $picture->name = $file_path;\n $picture->directory = $directory;\n $picture->albums_id = $id;\n\n $picture->save();\n }\n\n\n Session::flash('success', \"Vos photos on été ajoutées à l'album\");\n\n return redirect('/albums/'.$id);\n\n }", "function addMedia($a)\n\t{\n\t\tinclude FLGALLERY_GLOBALS;\n\n\t\t$album_id = isset($a['album_id']) ? (int)$a['album_id'] : 0;\n\t\t$gallery_id = isset($a['gallery_id']) ? (int)$a['gallery_id'] : 0;\n\n\t\t$order = $wpdb->get_var(\"\n\t\t\tSELECT MAX(`order`)\n\t\t\tFROM `{$plugin->dbImages}`\n\t\t\tWHERE\n\t\t\t\t`album_id` = '{$album_id}' AND\n\t\t\t\t`gallery_id` = '{$gallery_id}'\n\t\t\");\n\t\tif ($order === false) {\n\t\t\t$order = 0;\n\t\t\t$this->warning($wpdb->last_error);\n\t\t\t$this->debug($wpdb->last_query, array('Warning', $this->warningN));\n\t\t}\n\n\t\t$added = $media->addFiles($plugin->imgDir);\n\t\tif (count($added)) {\n\t\t\tforeach ($added as $key => $path) {\n\t\t\t\tif (!empty($path)) {\n\t\t\t\t\tif (preg_match('#^(/|[a-z]:)#i', $path)) {\n\t\t\t\t\t\t$fullPath = $path;\n\t\t\t\t\t\t$path = '/' . preg_replace('/^' . preg_quote(ABSPATH, '/') . '/', '', $path);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$fullPath = $plugin->imgDir . '/' . $path;\n\t\t\t\t\t}\n\n\n\t\t\t\t\tlist($width, $height) = $imageSize = getimagesize($fullPath);\n\n\t\t\t\t\t$insert = $wpdb->insert(\n\t\t\t\t\t\t$plugin->dbImages,\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'album_id' => $album_id,\n\t\t\t\t\t\t\t'gallery_id' => $gallery_id,\n\t\t\t\t\t\t\t'order' => ++$order,\n\t\t\t\t\t\t\t'type' => $imageSize['mime'],\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => basename($this->files[$key]),\n\t\t\t\t\t\t\t'title' => $this->filesInfo[$key]['title'],\n\t\t\t\t\t\t\t'description' => $this->filesInfo[$key]['description'],\n\t\t\t\t\t\t\t'link' => '',\n\t\t\t\t\t\t\t'target' => '',\n\t\t\t\t\t\t\t'width' => $width,\n\t\t\t\t\t\t\t'height' => $height,\n\t\t\t\t\t\t\t'size' => filesize($fullPath)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\tif ($insert !== false) {\n\t\t\t\t\t\t$this->error($wpdb->last_error);\n\t\t\t\t\t\t$this->debug($wpdb->last_query, array('Error', $media->errorN));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($album_id)) {\n\t\t\t\t$wpdb->update($plugin->dbAlbums, array('modified' => $func->now()), array('id' => $album_id));\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6447367", "0.5967513", "0.5963022", "0.58876604", "0.5765217", "0.5613605", "0.56116784", "0.5552352", "0.55000025", "0.5419363", "0.53597254", "0.5341553", "0.53407776", "0.53404325", "0.53361213", "0.5311107", "0.52692103", "0.5262326", "0.5248917", "0.5248222", "0.5230116", "0.52097106", "0.5196261", "0.5194303", "0.51890695", "0.515775", "0.5146404", "0.51331484", "0.51321024", "0.512521" ]
0.67797565
0
Create a new photoset for the calling user.
function photosets_create ($title, $primary_photo_id, $description = NULL) { $params = array(); $params['method'] = 'flickr.photosets.create'; $params['title'] = $title; $params['primary_photo_id'] = $primary_photo_id; if ($description) $params['description'] = $description; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photoset']; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newSet($set, $userid, $connection) {\r\n\t\t$connection -> exec(\"INSERT INTO \".$GLOBALS['dbPrefix'].\"question_set (`setname`,`setdescription`, `ownerid`, `editcount`, `createtimestamp`, `firstowner`) VALUES ('\" . $set -> getSetName() . \"', '\" . $set -> getSetDescription() . \"', \" . $userid . \", 1, '2009-00-00 00:00:00', \" . $userid . \");\");\r\n\t\t$set -> setSetId($connection -> lastInsertId());\r\n\t\tarray_push($this -> sets, $set);\r\n\t}", "function photosets_addPhoto ($photoset_id, $photo_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photosets.addPhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function store(Request $request)\n {\n return response()->json( Gallery::CreateUserPhoto(), 200);\n }", "public function createUserViaRequest()\n {\n $photo = photos()->createPhotoViaRequest();\n $user = User::create(array_merge([\n 'user_uuid' => authenticated()->uuid,\n 'photo_uuid' => $photo->uuid,\n 'photo_url' => config('storage.path') . $photo->photo_url,\n 'password' => bcrypt(input('password')),\n 'location' => parser()->pointFromCoordinates(input('coordinates')),\n ], only('name', 'email', 'is_public')));\n $user->photos()->attach($photo->uuid);\n $user->load('photo', 'user');\n return $user;\n }", "public function create($userId, $params = array())\n\t{\n\t\t$directory = $this->parameters->params['directory'];\n\n\t\t$albumsDir = $directory . DIRECTORY_SEPARATOR . 'albums';\n\n\t\tFileSystem::createDir($albumsDir);\n\n\t\t$i = 0;\n\t\tdo {\n\t\t\t$id = Strings::random(32);\n\t\t\t$i ++;\n\t\t} while ($i <= self::MAX_TRIES && is_dir($albumsDir . DIRECTORY_SEPARATOR . $id));\n\n\t\tif($i > self::MAX_TRIES) {\n\t\t\tthrow new \\Exception(sprintf(\"Unable to find unique id for the new album.\"));\n\t\t}\n\n\t\t$albumDir = $albumsDir . DIRECTORY_SEPARATOR . $id;\n\t\tFileSystem::createDir($albumDir);\n\t\t\n\t\t$params = Arrays::mergeTree(array('id' => $userId), $params);\n\n\t\t$this->saveMetadata($albumDir, $params);\n\n\t\t$this->addAlbumToUser($id, $userId);\n\n\t\t$this->cache->clean(array(\n\t\t\tCache::TAGS => [\"user-$userId\"]\n\t\t));\n\n\t\treturn $this->find($id);\n\t}", "public function createSet(Entity\\Set $set) {\n $data = array(\n 'name' => $set->get('name'),\n 'description' => $set->get('description', null)\n );\n\n $id = parent::create($data);\n\n return $set->setId($id);\n }", "function getPhotoSet($photoset_id){\n\n\t\t/* Get Photoset */\n\t\t$photoset_object = $this->askFlickr('photosets.getPhotos','&photoset_id='.$photoset_id.'&extras=url_o,url_z,url_l,url_s,url_q,url_t,media');\n\n\t\t/* Return our Photoset Object */\n\t\treturn $photoset_object;\n\t}", "public function testGetUserPhotosSuccess()\n {\n $user = factory(\\App\\User::class)->make();\n\n $user->photos()->createMany(\n factory(\\App\\Photo::class, 3)->make()->toArray()\n );\n\n $response = $this->get('/photos');\n\n $response->assertStatus(200);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'file' => 'required|image|max:10240',\n ]);\n\n $photo = new Photo();\n $photo->user_id = Auth::id();\n $photo->path = $this->uploadImg($request->file('file'), 'submissions/img');\n $photo->thumbnail_path = $this->createThumbnail($request->file('file'), 600, null, 'submissions/img/thumbs');\n $photo->save();\n\n return new PhotoResource($photo);\n }", "public function store(Request $request)\n {\n $user = JWTAuth::parseToken()->authenticate();\n\n if (Gate::forUser($user)->allows('albums-create', $user)) {\n $validator = Validator::make($request->all(), $this->validations);\n\n if ($validator->fails()) {\n return response()->json([\n 'success'=> false,\n 'errors' => $validator->errors()->all()\n ],400);\n }\n\n $record = $user->albums()->create($request->all());\n $album = $this->prepareAlbumData($record,[]);\n\n if($request->hasFile('image')){\n $image = $request->file('image');\n $this->createImage($user,$record,$image);\n\n $album['image'] = $this->getFileURL($record->image);\n }\n\n return response()->json([\n 'success' => true,\n 'album' => $album,\n 'message' => 'Album successfully created'\n ]);\n }else{\n return response()->json([\n 'success' => false,\n 'errors' => [\"Access denied. You can't create albums, you need to be an author.\"]\n ],403);\n }\n }", "public function create()\n {\n\n $postData = $this->request->request->all();\n $imageData = $postData['image'];\n\n $user = $this->user;\n $user->setUpdateDate(new \\DateTime());\n $timeStamp = $user->getUpdateDate()->getTimestamp();\n\n # Ensure directory is created\n $dirPath = '/images/photos/checkins/' . $user->getId();\n\n if (!file_exists(ROOTDIR . \"/\" . $dirPath)) {\n mkdir(ROOTDIR . \"/\" . $dirPath, 0777, true);\n }\n\n $filePath = $dirPath . '/' . (time() * rand(100, 1000)) . '.jpg';\n $photoUrl = filter_var($imageData, FILTER_VALIDATE_URL);\n\n if ($photoUrl !== false) {\n $uri = $photoUrl;\n } else {\n ImageHelper::saveImageFromBase64($imageData, ROOTDIR . $filePath);\n $uri = $filePath . \"?\" . $timeStamp;\n }\n\n $postData['uri'] = $uri;\n\n $checkIn = $this->checkInRepo->map($postData, $this->user);\n $this->checkInRepo->insert($checkIn);\n\n return $this->_generateResponse($checkIn->toArray(), Status::CREATED);\n }", "public function store(PhotoCreateRequest $request)\n {\n DB::beginTransaction();\n $photo = $this->createPhotoInstance($request->all());\n $photo->owner()->associate(auth()->user());\n $photo->save();\n\n $photo->location()->save(\n new PhotoLocation($request->only('location'))\n );\n\n $tags = $this->createTags(explode(',', $request->tags));\n\n $photo->tags()->sync($tags->pluck('id')->toArray());\n\n // Execute processing to external photo: download, apply geocoding...\n dispatch(new ProcessingExternalPhoto($photo));\n\n DB::commit();\n\n // 201\n return $photo;\n }", "public function create()\n {\n\n $this->data = array(\n 'templates' => \\Pageblok::getTemplates(\"gallery\"),\n );\n\n return parent::create();\n }", "public function create()\n {\n return view('backEnd.photos.create');\n }", "public function create()\n {\n $path = request()->file('photo')->store('testing');\n return response()->json(['path' => $path], 200);\n }", "public function create()\n {\n return view('backend.photos.create');\n }", "public function createNewStickerSet($user_id,$name,$title,$png_sticker,$emojis,$contains_masks=null,$mask_position=null){\n return $this->make_http_request(__FUNCTION__,(object) get_defined_vars());\n }", "function photosets_getList ($user_id = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photosets']['photoset'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function create()\n {\n //\n\t\treturn View::make('photos.create');\n }", "public function create($group)\n {\n $view = view(\"groups.photos.create\");\n $view->group_id = $group;\n return $view;\n }", "public function create($request) {\n\n\t\t$image = $request['photo'];\n\t\tif($image !== null) {\n\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t$request['photo'] = $name;\n\t\t} else {\n\t\t\t$request['photo'] = \"product-empty.png\";\n\t\t}\n\t\t$request['user_id'] = auth()->user()->id;\n\t\treturn $this->product->create($request);\n\t}", "public function create()\n {\n $albums = Album::all();\n return view('image.create')->with(['albums' => $albums]);\n }", "public function store($user_id, Request $request)\n {\n\n //data validation\n $validatedData = $request->validate([\n 'title' => 'required|max:512',\n 'picture' => 'required',\n ]);\n\n $last_id = Post::get()->last()->id;\n\n $post = new Post;\n $post->title = $validatedData['title'];\n $post->user_id = $user_id;\n\n $post->save();\n\n if(!is_null($request['tag_checkbox_1']))\n {\n $post->tags()->attach($request['tag_checkbox_1']);\n }\n\n if(!is_null($request['tag_checkbox_2']))\n {\n $post->tags()->attach($request['tag_checkbox_2']);\n }\n\n $post->image()->delete();\n $post->image()->create(['filename' => $validatedData['picture']]);\n\n session()->flash('message', 'Post created successfully');\n\n return $this->show_per_user($user_id);\n }", "public function store()\n {\n $photo = Photo::create($this->validateRequest());\n return redirect('recitals/photos');\n }", "public function photoCreate()\n {\n $gallery_id = Input::get('gallery_id');\n $gallery = PhotoGallery::where('id', '=', $gallery_id)->first();\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n $flags = $this->language->getAllDataNoPagination();\n\n return view('cms.modules.multicms.photos_addnew', compact('flags', 'gallery'), $data);\n\n }", "public function create()\n\t{\n\t\t$userGroupId = $this->data('name', $this->request->post('name'))->insert($this->table)->lastId();\n\n\t\t// Remove any empty value in the array\n\t\t$pages = array_filter($this->request->post('pages'));\n\n\t\tforeach ($pages as $page) {\n\t\t\t$this->data([\n\t\t\t\t'user_groups_id' => $userGroupId,\n\t\t\t\t'page' => $page,\n\t\t\t])->insert('users_permissions');\n\t\t}\n\t}", "public function store()\n\t{\n\t\t$input = Input::all();\n\n\t\t$image = new Photo();\n\t\t$image->user_id \t= $input['user_id'];\n\t\t$image->fileName \t= $input['fileName']->getClientOriginalName();\n\t\t$image->title \t\t= $input['title'];\n\t\t\n\t\tif($image->save()){\n\t\t\t\n\t\t\t$path = user_photos_path();\n\n\t\t\t$move_image = Image::make($input['fileName']->getRealPath());\n\n\t\t\tFile::exists($path) or File::makeDirectory($path);\n\n\t\t\t$move_image->save($path.$image->fileName)\n\t\t\t\t\t->resize(200,200)\n\t\t\t\t\t->greyscale()\n\t\t\t\t\t->save($path. 'tn-'.$image->fileName);\n\n\t\t\treturn Redirect::to('photos');\t\n\t\t}else{\n\t\t\treturn Ridirect::to('photos.create');\n\t\t}\n\t\n\t}", "public function create(Request $request)\n {\n $disciplines = Discipline::query()\n ->select('id', 'name')\n ->with('events')\n ->get()\n ->toArray();\n $watermarks = Watermark::query()->pluck('name', 'id');\n $licenses = License::query()->pluck('name', 'id');\n\n // Creates a random form session number\n $formSession = md5(microtime());\n Session::push('uploads.' . $formSession, time());\n // Create temp folders\n File::makeDirectory(public_path(UPLOAD_TEMP_FOLDER . $formSession));\n File::makeDirectory(public_path(UPLOAD_TEMP_FOLDER . $formSession . '/big'));\n\n return view('member/photos/create', [\n 'pageTitle' => 'Nouvelle photo',\n 'disciplines' => $disciplines,\n 'watermarks' => $watermarks,\n 'licenses' => $licenses,\n 'event' => $request->get('event'),\n 'formSession' => $formSession,\n ]);\n }", "function create_album($name, $cover_photo)\n {\n $conn = db_connect();\n\n $user_id = $_SESSION['user_id'];\n //created an album based on the user's id and the parameters they provided\n \t$sql = \"INSERT INTO album (album_name, cover_photo, user_id) VALUES \n \t('$name', '$cover_photo', '$user_id')\";\n\n \tmysqli_query($conn, $sql);\n\n \techo '<h2>Your album was created!</h2>';\n\n }", "public function store(Request $request)\n {\n $foods = $request->get('foods');\n\n $price = 0;\n foreach ($foods as $food1) {\n $food = Food::find($food1['id']);\n $price += $food['quantity'] * $food['price'];\n };\n\n Log::info($request->get('category_id'));\n $set = Set::create([\n 'name' => $request->get('name'),\n 'type' => 1,\n 'category_id' => (int)$request->get('category_id'),\n 'price' => $price\n ]);\n\n foreach ($foods as $food){\n $set->foods()->attach($food['id'], ['quantity' => $food['quantity']]);\n }\n\n $image = $request['image']['file']['thumbUrl'];\n Cloudder::upload($image, null);\n $result = Cloudder::getResult();\n $image_id = $result['public_id'] . '.' . $result['format'];\n $set->image = $image_id;\n\n\n $set->save();\n//\n return $set->toJson();\n }" ]
[ "0.5859416", "0.5695981", "0.5670443", "0.5606731", "0.5290574", "0.5285441", "0.52847236", "0.5263133", "0.5246096", "0.5227062", "0.522608", "0.52151823", "0.5202057", "0.5195578", "0.5190853", "0.5186903", "0.51649785", "0.5164225", "0.51553214", "0.5144366", "0.51269615", "0.51257724", "0.5123117", "0.51154864", "0.51121914", "0.51100445", "0.51078683", "0.51023287", "0.5098634", "0.5091095" ]
0.61232895
0
Modify the photos in a photoset. Use this method to add, remove and reorder photos.
function photosets_editPhotos ($photoset_id, $photo_ids, $primary_photo_id = NULL) { $params = array(); $params['method'] = 'flickr.photosets.editPhotos'; $params['photoset_id'] = $photoset_id; $photo_ids = explode(',', $photo_ids); array_map('trim', $photo_ids); if (!$primary_photo_id) { $params['primary_photo_id'] = $photo_ids[0]; } else { $params['primary_photo_id'] = $primary_photo_id; } $photo_ids = implode(',', $photo_ids); $params['photo_ids'] = $photo_ids; $response = $this->execute($params, 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPhotos($value)\n {\n $this->photos = $value;\n }", "function __reimportPhotos(){\n\t\t$this->Asset->disablePermissionable();\n\t\t$this->Asset->recursive=0;\n\t\t$json = $this->Asset->find('all', array('fields'=>'json_src'));\n\t\t$json =Set::extract($json, '/Asset/json_src');\n\t\tforeach ($json as $row) {\n\t\t\t$imgSrc = json_decode($row);\n\t\t\t$src = \"Summer2009/\".basename($imgSrc->orig);\n\t\t\t$dest = $imgSrc->preview;\n\t\t\t$src_baseurl = Configure::read('path.local.preview');\n\t\t\t$dest_baseurl = Configure::read('stageroot.basepath');\n\t\t\t$shell_cmd[] =\"cp {$src_baseurl}/{$src} {$dest_baseurl}/{$dest}\";\n\t\t\t//\t\t\tmkdir(dirname(Configure::read('stageroot.basepath').\"/{$dest}\"), 0777, $recursive=true);\n\t\t\t//\t\t\tcopy( Configure::read('path.local.preview').\"/{$src}\", Configure::read('stageroot.basepath').\"/{$dest}\");\n\t\t}\n\t\tdebug($shell_cmd);\n\t}", "public static function renumberPostionsToAccountForNewlyDeletedPhotos()\n {\n $position = 1;\n $photos = parent::whereUserId(auth()->id())->orderBy('position')->orderBy('updated_at')->get();\n foreach ($photos as $photo) {\n $photo->update(['position' => $position]);\n $position++;\n }\n }", "function photosets_removePhoto ($photoset_id, $photo_id) {\n\t\t$params['method'] = 'flickr.photosets.orderSets';\n\t\t$response = $this->execute(array('method' => 'flickr.photosets.removePhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function sync_flickr($search,$new_only=false,$photoset=0,$photoset_name=\"\",$private=0)\n\t{\n\t\n\tglobal $flickr_api_key, $flickr_token, $flickr_caption_field, $flickr_keywords_field, $flickr_prefix_id_title, $lang;\n\t\t\t\n\t$results=do_search($search);\n\t\n\tforeach ($results as $result)\n\t\t{\n\t\tglobal $view_title_field;\n\n\t\t# Fetch some resource details.\n\t\t$title=i18n_get_translated($result[\"field\" . $view_title_field]);\n\t\t$description=sql_value(\"select value from resource_data where resource_type_field=$flickr_caption_field and resource='\" . $result[\"ref\"] . \"'\",\"\");\n\t\t$keywords=sql_value(\"select value from resource_data where resource_type_field=$flickr_keywords_field and resource='\" . $result[\"ref\"] . \"'\",\"\");\n\t\t$photoid=sql_value(\"select flickr_photo_id value from resource where ref='\" . $result[\"ref\"] . \"'\",\"\");\n\n\t\t# Prefix ID to title?\n\t\tif ($flickr_prefix_id_title)\n\t\t\t{\n\t\t\t$title=$result[\"ref\"] . \") \" . $title;\n\t\t\t}\n\t\t\t\n\t\tif (!$new_only || $photoid==\"\")\n\t\t\t{\n\t\t\techo \"<li>\" . $lang[\"processing\"] . \": \" . $title . \"\\n\";\n\t\n\t\t\t$im=get_resource_path($result[\"ref\"],true,\"scr\",false,\"jpg\");\n\t\n\t\t\t# If replacing, add the photo ID of the photo to replace.\n\t\t\tif ($photoid!=\"\")\n\t\t\t\t{echo \"<li>\" . str_replace(\"%photoid\", $photoid, $lang[\"updating_metadata_for_existing_photoid\"]);\n\t\t\t\t\n\t\t\t\t# Also resubmit title, description and keywords.\n\t\t\t\tflickr_api(\"http://flickr.com/services/rest/\",array(\"api_key\"=>$flickr_api_key,\"method\"=>\"flickr.photos.setTags\",\"auth_token\"=>$flickr_token, \"photo_id\"=>$photoid, \"tags\"=>$keywords));\n\n\t\t\t\tflickr_api(\"http://flickr.com/services/rest/\",array(\"api_key\"=>$flickr_api_key,\"method\"=>\"flickr.photos.setMeta\",\"auth_token\"=>$flickr_token, \"photo_id\"=>$photoid, \"title\"=>$title, \"description\"=>$description));\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t# New uploads only. Send the photo file.\n\t\t\tif ($photoid==\"\")\t\n\t\t\t\t{\n\n\t\t\t\t$url=\"http://api.flickr.com/services/upload/\";\n\n\t\t\t\t# Build paramater list for upload\n\t\t\t\t$data=array(\n\t\t\t\t\"photo\"=>\"@\" . $im,\n\t\t\t\t\"api_key\"=>$flickr_api_key,\n\t\t\t\t\"auth_token\" => $flickr_token,\n\t\t\t\t\"title\" => $title,\n\t\t\t\t\"description\" => $description,\n\t\t\t\t\"tags\" => $keywords\n\t\t\t\t);\n\n\t\t\t\t# Add the signature by signing the data...\n\t\t\t\t$data[\"api_sig\"]=flickr_sign($data,array(\"photo\"),true);\n\t\t\t\t\n\t\t\t\t# Use CURL to upload the photo.\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\t\t$photoid=flickr_get_response_tag(curl_exec($ch),\"photoid\");\n\t\t\t\t\n\t\t\t\techo \"<li>\" . str_replace(\"%photoid\", $photoid, $lang[\"photo-uploaded\"]);\n\n\t\t\t\t# Update Flickr tag ID\n\t\t\t\tsql_query(\"update resource set flickr_photo_id='\" . escape_check($photoid) . \"' where ref='\" . $result[\"ref\"] . \"'\");\n\t\t\t\t}\n\n\t\t\t$created_new_photoset=false;\n\t\t\tif ($photoset==0)\n\t\t\t\t{\n\t\t\t\t# Photoset must be created.\n\t\t\t\tflickr_api(\"http://flickr.com/services/rest/\",array(\"api_key\"=>$flickr_api_key,\"method\"=>\"flickr.photosets.create\",\"auth_token\"=>$flickr_token, \"title\"=>$photoset_name, \"primary_photo_id\"=>$photoid),\"\",\"POST\");\n\t\t\t\tglobal $last_xml;\n\t\t\t\t#echo htmlspecialchars($last_xml);\n\t\t\t\t$pos_1=strpos($last_xml,\"id=\\\"\");\n\t\t\t\t$pos_2=strpos($last_xml,\"\\\"\",$pos_1+5);\n\t\t\t\t$photoset=substr($last_xml,$pos_1+4,$pos_2-$pos_1-4);\n\t\t\t\techo \"<li>\" . str_replace(array(\"%photoset_name\", \"%photoset\"), array($photoset_name, $photoset), $lang[\"created-new-photoset\"]);\n\t\t\t\t$created_new_photoset=true;\n\t\t\t\t}\n\n\t\t\t# Add to photoset\n\t\t\tif (!$created_new_photoset) # If we've just created a photoset then this will already be present within it as the primary photo (added during the create photoset request).\n\t\t\t\t{\n\t\t\t\tflickr_api(\"http://flickr.com/services/rest/\",array(\"api_key\"=>$flickr_api_key,\"method\"=>\"flickr.photosets.addPhoto\",\"auth_token\"=>$flickr_token, \"photoset_id\"=>$photoset, \"photo_id\"=>$photoid));\n\t\t\t\techo \"<li>\" . str_replace(array(\"%photoid\", \"%photoset\"), array($photoid, $photoset), $lang[\"added-photo-to-photoset\"]);\n\t\t\t\t#global $last_xml;echo nl2br(htmlspecialchars($last_xml));\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t# Set permissions\n\t\t\techo \"<li>\" . str_replace(\"%permission\", $private==0 ? $lang[\"flickr_public\"] : $lang[\"flickr_private\"], $lang[\"setting-permissions\"]);\n\t\t\tflickr_api(\"http://flickr.com/services/rest/\",array(\"api_key\"=>$flickr_api_key,\"method\"=>\"flickr.photos.setPerms\",\"auth_token\"=>$flickr_token, \"photo_id\"=>$photoid, \"is_public\"=>($private==0?1:0),\"is_friend\"=>0,\"is_family\"=>0,\"perm_comment\"=>0,\"perm_addmetadata\"=>0),\"\",\"POST\");\n\n\t\t\t\n\t\t\t}\n\t\t}\n\techo \"<li>\" . $lang[\"done\"];\n\t}", "private function addProductPhotos(array $request){\n\n if(array_key_exists('photos', $request)){\n \n foreach($request['photos'] as $photos){\n\n $photo = new Photo();\n\n $photoProduct = Product::where('name', $request['name'])->get();\n $path = $photos->store('/storage/products');\n $filename = basename($path);\n $extension = $photos->getClientOriginalExtension();\n \n $photo->product_id = $photoProduct[0]->id; \n $photo->path = $filename;\n $photo->extension = $extension;\n\n $photo->save();\n }\n }\n }", "function photosets_getPhotos ($photoset_id, $per_page = 25, $page = 1, $media = 'photos', $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.getPhotos';\n\t\t$params['photoset_id'] = $photoset_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\t$params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photoset'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"uploads\";\n $destination_path = \"products\";\n\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n }", "private function setImgArray($data)\n {\n //====================================================================//\n // Safety Check\n if (!is_array($data) && !is_a($data, \"ArrayObject\")) {\n return false;\n }\n //====================================================================//\n // Load Object Images List for Whole Product\n $this->imagesCache = Image::getImages(SLM::getDefaultLangId(), $this->object->id);\n\n //====================================================================//\n // UPDATE IMAGES LIST\n //====================================================================//\n\n $this->imgPosition = 0;\n $visibleImageIds = array();\n //====================================================================//\n // Given List Is Not Empty\n foreach ($data as $inValue) {\n //====================================================================//\n // Check Image Array is here\n if (!isset($inValue[\"image\"]) || empty($inValue[\"image\"])) {\n continue;\n }\n $this->imgPosition++;\n //====================================================================//\n // Search For Image In Current List\n $psImage = $this->searchImage($inValue[\"image\"][\"md5\"]);\n if (false == $psImage) {\n //====================================================================//\n // If Not found, Add this object to list\n $psImage = $this->addImageToProduct(\n $inValue[\"image\"],\n $this->getImagePosition($inValue),\n $this->getImageCoverFlag($inValue)\n );\n }\n //====================================================================//\n // Safety Check\n if (!($psImage instanceof Image)) {\n continue;\n }\n //====================================================================//\n // Update Image Position in List\n $this->updateImagePosition($psImage, $inValue);\n $this->updateImageCoverFlag($psImage, $inValue);\n //====================================================================//\n // Update Image Object in Database\n $this->updateImage($psImage);\n //====================================================================//\n // Add Ps Image Id to Visible\n if ($this->getImageVisibleFlag($inValue)) {\n $visibleImageIds[] = $psImage->id;\n }\n }\n\n //====================================================================//\n // Update Combination Images List\n $this->updateAttributeImages($visibleImageIds);\n\n //====================================================================//\n // If Current Image List Is Empty => Clear Remaining Local Images\n $this->cleanImages($this->imagesCache);\n\n //====================================================================//\n // Generate Images Thumbnail\n $this->updateImgThumbnail();\n\n //====================================================================//\n // Flush Images Infos Cache\n $this->flushImageCache();\n\n return true;\n }", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"public_folder\";\n $destination_path = \"uploads/albums\";\n $album_originalName = $_POST['name'];\n // ******** Generate unique album name ********\n $album_name = md5( $album_originalName . time() );\n \n foreach ( $value as $file ) {\n // 0. Generate new size file\n $image = \\Image::make( $file );\n $image_350 = \\Image::make( $file ) -> widen( 350 );\n \n // 1. Generate new file names\n $new_file_name = md5( $file -> getClientOriginalName() . time() ).'.'.$file->getClientOriginalExtension();\n $new_file_name_350 = md5( $file -> getClientOriginalName() . time() ).'_350.'.$file->getClientOriginalExtension();\n \n // 2. Move new files to the correct path\n $file_path = $destination_path . '/' . $album_name . '/' . $new_file_name;\n $file_path_350 = $destination_path . '/' . $album_name . '/' . $new_file_name_350;\n \\Storage::disk( $disk )->put( $file_path, $image -> stream() );\n \\Storage::disk( $disk )->put( $file_path_350, $image_350 -> stream() );\n \n // 3. Add the public path to the database\n $attribute_value[] = [ $file_path, $file_path_350 ];\n }\n $this->attributes[$attribute_name] = str_replace( '\\\\', '', json_encode($attribute_value) );\n }", "public function DeletePhotos()\n\t{\tforeach ($this->imagesizes as $sizename=>$size)\n\t\t{\t@unlink($this->GetImageFile($sizename));\n\t\t}\n\t}", "public function photos()\n {\n return $this->morphedByMany(Photo::class, 'taggable');\n }", "function local_ltiprovider_membership_service_update_userphotos( $userphotos ) {\n\n // Sync of user photos.\n mtrace( \"Sync user profile images\" );\n $counter = 0;\n if ( $userphotos ) {\n foreach ( $userphotos as $userid => $url ) {\n if ( $url ) {\n $result = local_ltiprovider_update_user_profile_image( $userid, $url );\n if ( $result === true ) {\n $counter ++;\n mtrace( \"Profile image succesfully downloaded and created from $url\" );\n } else {\n mtrace( $result );\n }\n }\n }\n }\n mtrace( \"$counter profile images updated\" );\n}", "public static function replenishPhotosCollection($photos_collection, $columns_number = self::COLUMNS_DEFAULT)\n\t{\n\t\t$helper = new self($photos_collection, $columns_number);\n\t\t\n\t\treturn $helper->photos_collection;\n\t}", "public function setPhoto(Photo $photoObject);", "function main() {\n \n //first, dig out the photos we already have\n $args = array(\n 'orderby' => 'date',\n 'order' => 'DESC'\n );\n \n //Check and add new photos\n foreach ($this->galleries as $gallery) {\n $args['media_tags'] = $gallery['mediatag'];\n\n $old_photos = get_attachments_by_media_tags($args);\n $this->add_new_recursive(1, $old_photos, $gallery);\n }\n}", "private function replenishImagesCollectionWithGaps()\n\t{\t\t\n\t\t$gaps_indexes = $this->itemboard->gapsIndexes();\n\t\t$photos_collection = $this->photos_collection;\n\t\t$photos_gallery = new Illuminate\\Database\\Eloquent\\Collection;\n\t\t\n\t\t$photos_collection_count = $photos_collection->count() + count($this->itemboard->gapsIndexes());\n\t\t\n\t\tfor($i = 0; $i < $photos_collection_count; $i++)\n\t\t{\n\t\t\tif (in_array($i, $gaps_indexes))\n\t\t\t{\n\t\t\t\t$photo = new Photo();\n\t\t\t\t$photo->file_path = self::GAP_IMAGE_FILE_PATH;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$photo = $photos_collection->pop();\n\t\t\t}\n\n\t\t\t$photos_gallery->push($photo);\n\t\t}\n\t\t\n\t\t$this->photos_collection = $photos_gallery;\n\t}", "public function syncImages() {\r\n\r\n /** @var Mage_Catalog_Helper_Product_Flat $helper */\r\n $process = Mage::helper('catalog/product_flat')->getProcess();\r\n $status = $process->getStatus();\r\n $process->setStatus(Mage_Index_Model_Process::STATUS_RUNNING);\r\n\r\n // Fetch attribute set id by attribute set name\r\n /** @var $collection Mage_Catalog_Model_Resource_Product_Collection */\r\n $attributeSetId = Mage::getModel('eav/entity_attribute_set')\r\n ->load('Oodji', 'attribute_set_name')\r\n ->getAttributeSetId();\r\n\r\n $website = Mage::getResourceModel('core/website_collection')\r\n ->addFieldToFilter('code', 'oodji')\r\n ->getFirstItem();\r\n\r\n $storeId = Mage::app()->getStore(Mage::app()->getWebsite($website)->getDefaultGroup()->getDefaultStoreId())->getId();\r\n\r\n // Load product model collection filtered by attribute set id\r\n $products = Mage::getResourceModel('catalog/product_collection')\r\n ->setStoreId($storeId)\r\n ->addAttributeToSelect('name')\r\n ->addAttributeToSelect('sku')\r\n ->addAttributeToFilter('type_id', 'configurable')\r\n ->addFieldToFilter('attribute_set_id', $attributeSetId)\r\n ->addFieldToFilter('status', 2);\r\n\r\n $process->setStatus($status);\r\n\r\n // Process your product collection as per your bussiness logic\r\n /** @var Agere_PhotoGrabber_Helper_Grabber $grab */\r\n $grab = Mage::helper('photoGrabber/grabber');\r\n\r\n foreach($products as $product){\r\n $grab->searchProduct($product->getSku());\r\n }\r\n }", "public function getAllPhotos();", "function photosets_addPhoto ($photoset_id, $photo_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photosets.addPhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function update(Request $request)\n {\n\n\n $validator = Validator::make($request->all(), [\n 'file-multiple-input' => 'required',\n 'file-multiple-input.*' => 'mimes:jpg,png,jpeg'\n\n ]);\n if ($validator->passes()) {\n\n\n $photos = $request->file('file-multiple-input');\n if (!is_array($photos)) {\n $photos = [$photos];\n }\n\n if (!is_dir($this->photos_path)) {\n mkdir($this->photos_path, 0777);\n }\n $deleteImages = Image::where('property_id', $request->input('property_id'))\n ->delete();\n\n for ($i = 0; $i < count($photos); $i++) {\n $photo = $photos[$i];\n $name = sha1(date('YmdHis') . Str::random(30));\n $save_name = $name . '.' . $photo->getClientOriginalExtension();\n $resize_name = $name . Str::random(2) . '.' . $photo->getClientOriginalExtension();\n\n InterventionImage::make($photo)\n ->encode('jpg', 75)\n ->resize(1000, 750)\n ->crop(1000, 750)\n ->save($this->photos_path . '/' . $resize_name);\n\n $photo->move($this->photos_path, $save_name);\n $upload = new Image();\n $upload->file = $save_name;\n $upload->resizedfilename = $resize_name;\n $upload->originalfilename = basename($photo->getClientOriginalName());\n $upload->property_id = $request->input('property_id');\n $upload->save();\n }\n }\n\n return redirect()->route('property_details', ['id' => $request->input('property_id')]);\n }", "private function setImgArray(array $data): bool\n {\n //====================================================================//\n // Load Object Images List for Whole Product\n $this->imagesCache = Image::getImages(\n SLM::getDefaultLangId(),\n (int) $this->object->id,\n null,\n Shop::getContextShopID(true)\n );\n\n //====================================================================//\n // UPDATE IMAGES LIST\n //====================================================================//\n\n $this->imgPosition = 0;\n $visibleImageIds = array();\n //====================================================================//\n // Given List Is Not Empty\n /** @var array|ArrayObject $value */\n foreach ($data as $value) {\n $value = ($value instanceof ArrayObject) ? $value->getArrayCopy() : $value;\n //====================================================================//\n // Check Image Array is here\n if (!isset($value[\"image\"]) || empty($value[\"image\"])) {\n continue;\n }\n $inImage = ($value[\"image\"] instanceof ArrayObject) ? $value[\"image\"]->getArrayCopy() : $value[\"image\"];\n $this->imgPosition++;\n //====================================================================//\n // Search For Image In Current List\n $psImage = $this->searchImage($value[\"image\"][\"md5\"]);\n if (false == $psImage) {\n //====================================================================//\n // If Not found, Add this object to list\n $psImage = $this->addImageToProduct(\n $inImage,\n (int) $this->getImagePosition($value),\n (bool) $this->getImageCoverFlag($value)\n );\n }\n //====================================================================//\n // Safety Check\n if (!($psImage instanceof Image)) {\n continue;\n }\n //====================================================================//\n // Update Image Position in List\n $this->updateImagePosition($psImage, $value);\n $this->updateImageCoverFlag($psImage, $value);\n //====================================================================//\n // Update Image Object in Database\n $this->updateImage($psImage);\n //====================================================================//\n // Add Ps Image Id to Visible\n if ($this->isImageVisible($value)) {\n $visibleImageIds[] = $psImage->id;\n }\n }\n\n //====================================================================//\n // Update Combination Images List\n $this->updateAttributeImages($visibleImageIds);\n\n //====================================================================//\n // If Current Image List Is Empty => Clear Remaining Local Images\n $this->cleanImages($this->imagesCache);\n\n //====================================================================//\n // Generate Images Thumbnail\n $this->updateImgThumbnail();\n\n //====================================================================//\n // Flush Images Infos Cache\n $this->flushImageCache();\n\n return true;\n }", "public function sort() {\n\t\tif ($this->request->is('post')) {\n\t\t\t$order = explode(\",\", $_POST['order']);\n\t\t\t$i = 1;\n\t\t\tforeach ($order as $photo) {\n\t\t\t\t$this->Picture->read(null, $photo);\n\t\t\t\t$this->Picture->set('order', $i);\n\t\t\t\t$this->Picture->save();\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\t$this->render(false, false);\n\t}", "public function setPictures(?array $pictures) : void\n {\n $this->set('pictures', $pictures, 'products');\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 photosets_orderSets ($photoset_ids) {\n\t\t$params['method'] = 'flickr.photosets.orderSets';\n\t\t$response = $this->execute(array('method' => 'flickr.photosets.orderSets', 'photoset_ids' => $photoset_ids), 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "private function displayViewphotoset() {\n $this->addCSS(\"flickr_viewphotoset.css\");\n\n /* Display images */\n $photoset_id = null;\n if(isset($_GET['url_photoset'])) {\n $photoset_id = trim($_GET[\"url_photoset\"]);\n } elseif( isset($this->conf_ts[\"show.\"][\"params.\"][\"photoset_id\"])) {\n $photoset_id = $this->conf_ts[\"show.\"][\"params.\"][\"photoset_id\"];\n } elseif( isset($this->conf_ts[\"show.\"][\"vps_default\"]) ) {\n $photoset_id = $this->conf_ts[\"show.\"][\"vps_default\"];\n }\n\n $params = array(\"photoset_id\"=>$photoset_id);\n $params = array_merge($params,array(\"extras\"=>\"owner_name,icon_server,original_format,\n last_update,geo,tags,machine_tags,o_dims,views,media,path_aliasurl_sq,url_t,url_s,url_m,url_o\"));\n $photos = $this->flickr->restFlickr_Photosets_getPhotos($params);\n if(!$photos) $this->callFlickrError();\n\n $photosets = false;\n $photosets = $this->flickr->restFlickr_Photosets_getList(array(\"user_id\"=>$photos[\"photoset\"][\"owner\"]));\n if(!$photosets) $this->callFlickrError();\n\n $ps = array();\n foreach($photosets[\"photosets\"][\"photoset\"] as $key=>$val) {\n $val[\"typo3_uri\"] = $this->pi_getPageLink($GLOBALS['TSFE']->id,'',array(\"url_photoset\"=>$val[\"id\"]));\n $ps[$key] = $val;\n };\n $photosets[\"photosets\"][\"photoset\"] = $ps;\n unset($ps);\n\n $photoset = $this->flickr->restFlickr_Photosets_getInfo(array(\"photoset_id\"=>$photoset_id));\n if(!$photoset) $this->callFlickrError();\n\n $this->smarty->assign(\"vps_show_picker\",$this->conf_ts[\"show.\"][\"vps_show_picker\"]);\n $this->smarty->assign(\"vps_show_photoset_list\",$this->conf_ts[\"show.\"][\"vps_show_photoset_list\"]);\n $this->smarty->assign(\"vps_show_desc\",$this->conf_ts[\"show.\"][\"vps_show_desc\"]);\n $this->smarty->assign(\"photoset\",$photoset[\"photoset\"]);\n $this->smarty->assign(\"photos\",$photos[\"photoset\"][\"photo\"]);\n $this->smarty->assign(\"photosets\",$photosets[\"photosets\"][\"photoset\"]);\n $this->smarty->assign(\"photoset_id\",$photoset_id);\n\n if($photoset_id != null) return $this->smarty_display(\"flickr_viewphotoset.xhtml\");\n return \"\";\n }", "public function updateWithImages($request) {\n $images = $request->has('files-keep-data.*.id')? $request->input('files-keep-data.*.id'): [];\n $remove_images = $request->has('files-remove-data.*.id')? $request->input('files-remove-data.*.id'): [];\n\n if($request->hasFile(\"images\")) {\n // fileService is declared by the extending controller\n $ids = $this->fileService->createBatch($request->file(\"images\"), ($request->only('files-data')) ? $request->only('files-data') : []);\n foreach($ids as $new_id) {\n $images[] = $new_id;\n }\n }\n if(!empty($remove_images) && !empty($images)) {\n foreach($images as $k => $image) {\n if(in_array($image, $remove_images)) {\n unset($images[$k]);\n }\n }\n }\n return $images;\n }", "function add_new_recursive($startnum, $old_photos, $gallery) {\n \n //now search for new photos\n $new_photos = $this->get_photos($gallery['groupid'], $startnum);\n if (!$new_photos) {\n //something is wrong\n return;\n }\n \n $old = false; //flag if some of the photos are already inte tha database\n foreach ($new_photos as $photo) {\n if ($photo && $this->check_if_new($photo, $old_photos))\n {\n //if the photo is new, \n //add it to the wordpress database\n $this->add_photo($photo, $gallery);\n } else {\n $old = true;\n }\n }\n if (!$old) {\n //If no photos were old, there might be more to find\n $this->add_new_recursive($startnum + 1, $old_photos, $gallery);\n }\n}" ]
[ "0.61253875", "0.58572537", "0.57873374", "0.5724591", "0.56968266", "0.5540416", "0.55236626", "0.54659045", "0.5458521", "0.5396567", "0.5370602", "0.5351635", "0.534072", "0.5332234", "0.5330528", "0.53213567", "0.5305942", "0.52972233", "0.5249905", "0.52400357", "0.52374434", "0.5222922", "0.5196542", "0.51654136", "0.5161003", "0.51488006", "0.51370203", "0.51263833", "0.5109929", "0.51023376" ]
0.6656051
0
Gets information about a photoset.
function photosets_getInfo ($photoset_id) { $response = $this->execute(array('method' => 'flickr.photosets.getInfo', 'photoset_id' => $photoset_id)); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photoset']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPhotoSetInfo($photoset_id){\n\n\t\t/* Get Photoset Name and Description */\n\t\t$photoset_info = $this->askFlickr('photosets.getInfo','&photoset_id='.$photoset_id);\n\n\t\t/* Return Photo Info Object */\n\t\treturn $photoset_info;\n\t}", "function getPhotoSet($photoset_id){\n\n\t\t/* Get Photoset */\n\t\t$photoset_object = $this->askFlickr('photosets.getPhotos','&photoset_id='.$photoset_id.'&extras=url_o,url_z,url_l,url_s,url_q,url_t,media');\n\n\t\t/* Return our Photoset Object */\n\t\treturn $photoset_object;\n\t}", "function getPhotosetInfo ($set_id) {\n global $config;\n $json = cacheGet('photosetinfo-' . $set_id);\n if (!$json) {\n $json = file_get_contents('https://api.flickr.com/services/rest/?method=flickr.photosets.getInfo&user_id=' . $config['user_id'] . '&photoset_id=' . $set_id . '&format=json&api_key=' . $config['api_key']);\n cacheSet('photosetinfo-' . $set_id, $json);\n }\n return json_decode(substr($json, 14, -1), true);\n}", "function photosets_getPhotos ($photoset_id, $per_page = 25, $page = 1, $media = 'photos', $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.getPhotos';\n\t\t$params['photoset_id'] = $photoset_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\t$params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photoset'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function photosets_getList ($user_id = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photosets']['photoset'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "private function displayViewphotoset() {\n $this->addCSS(\"flickr_viewphotoset.css\");\n\n /* Display images */\n $photoset_id = null;\n if(isset($_GET['url_photoset'])) {\n $photoset_id = trim($_GET[\"url_photoset\"]);\n } elseif( isset($this->conf_ts[\"show.\"][\"params.\"][\"photoset_id\"])) {\n $photoset_id = $this->conf_ts[\"show.\"][\"params.\"][\"photoset_id\"];\n } elseif( isset($this->conf_ts[\"show.\"][\"vps_default\"]) ) {\n $photoset_id = $this->conf_ts[\"show.\"][\"vps_default\"];\n }\n\n $params = array(\"photoset_id\"=>$photoset_id);\n $params = array_merge($params,array(\"extras\"=>\"owner_name,icon_server,original_format,\n last_update,geo,tags,machine_tags,o_dims,views,media,path_aliasurl_sq,url_t,url_s,url_m,url_o\"));\n $photos = $this->flickr->restFlickr_Photosets_getPhotos($params);\n if(!$photos) $this->callFlickrError();\n\n $photosets = false;\n $photosets = $this->flickr->restFlickr_Photosets_getList(array(\"user_id\"=>$photos[\"photoset\"][\"owner\"]));\n if(!$photosets) $this->callFlickrError();\n\n $ps = array();\n foreach($photosets[\"photosets\"][\"photoset\"] as $key=>$val) {\n $val[\"typo3_uri\"] = $this->pi_getPageLink($GLOBALS['TSFE']->id,'',array(\"url_photoset\"=>$val[\"id\"]));\n $ps[$key] = $val;\n };\n $photosets[\"photosets\"][\"photoset\"] = $ps;\n unset($ps);\n\n $photoset = $this->flickr->restFlickr_Photosets_getInfo(array(\"photoset_id\"=>$photoset_id));\n if(!$photoset) $this->callFlickrError();\n\n $this->smarty->assign(\"vps_show_picker\",$this->conf_ts[\"show.\"][\"vps_show_picker\"]);\n $this->smarty->assign(\"vps_show_photoset_list\",$this->conf_ts[\"show.\"][\"vps_show_photoset_list\"]);\n $this->smarty->assign(\"vps_show_desc\",$this->conf_ts[\"show.\"][\"vps_show_desc\"]);\n $this->smarty->assign(\"photoset\",$photoset[\"photoset\"]);\n $this->smarty->assign(\"photos\",$photos[\"photoset\"][\"photo\"]);\n $this->smarty->assign(\"photosets\",$photosets[\"photosets\"][\"photoset\"]);\n $this->smarty->assign(\"photoset_id\",$photoset_id);\n\n if($photoset_id != null) return $this->smarty_display(\"flickr_viewphotoset.xhtml\");\n return \"\";\n }", "function getPhotoInfo($photoId);", "public function getPhotos();", "public function getPhotos()\n {\n return $this->photos;\n }", "public function getPhotosData() {\n\t\t// 画像データ取得\n\t\t$results = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => PHOTOSSEARCH,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'sort' => SORTTYPE,\n\t\t\t\t'accuracy' => ACCURACY,\n\t\t\t\t'content_type' => CONTENTTYPE,\n\t\t\t\t'license' => LICENSE,\n\t\t\t\t'privacy_filter' => PRIVACYFILTER,\n\t\t\t\t'per_page' => PERPAGE,\n\t\t\t\t'safe_search' => SAFESEARCH,\n\t\t\t\t'tags' => TAGS,\n\t\t\t));\n\n\t\t$body = $results->body;\n\t\treturn unserialize($body);\n\t}", "function getsetinfo($set_id)\n {\n\t\t$this->db->select('sets.id AS sid, year, DATE_FORMAT(start, \\'%d/%m/%Y\\') AS start, DATE_FORMAT(end, \\'%d/%m/%Y\\') AS end, users.id, firstname, lastname, professor_attr', FALSE);\n\t\t$this->db->from('users');\n\t\t$this->db->join('sets', 'sets.professor_id = users.id');\n\t\t$this->db->where('sets.id', $set_id);\n\n\t\t$query = $this->db->get();\n\n\t\treturn $query->row_array();\n }", "function photosets_getContext ($photoset_id, $photo_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photosets.getContext', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\tunset($object['stat']);\n\t\t\treturn $object;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "function see_photos()\n{\n\tinclude 'storedInfo.php';\n\tini_set('display_errors', 'On');\n\t$photo_set_num = $_POST['photo_set_num'];\n\t\n\t$mysqli = new mysqli(\"oniddb.cws.oregonstate.edu\", \"jonesmi-db\", $myPassword, \"jonesmi-db\");\n\tif ($mysqli->connect_errno) \n\t{\n\t\techo \"Failed to connect to MySQL: (\" . $mysqli->connect_errno . \") \" . $mysqli->connect_error;\n\t} else \n\t{\n\t\t//echo \"connection worked!<br><br>\";\n\t} \n\tif (!($stmt = $mysqli->prepare(\"SELECT UserPhotos.filename\n\t\tFROM UserPhotos\n\t\tWHERE UserPhotos.set_num = ?\"))) \n\t{\n\t\techo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n\t}\n\t\n\tif(!($stmt->bind_param(\"i\",$photo_set_num)))\n\t{\n\t\techo \"Bind failed: \" . $stmt->errno . \" \" . $stmt->error;\n\t}\n\tif (!$stmt->execute()) \n\t{\n\techo \"Execute failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n\t}\n\n\t$out_filename = NULL;\n\n\tif (!$stmt->bind_result($out_filename)) \n\t{\n\t\techo \"Binding output parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t}\n\t$new_file = (string)$out_filename;\n\t$counter = 0;\n\twhile($stmt->fetch())\n\t{\t\n\t\t$display_string = \"<img src = $out_filename >\";\n\t\techo $display_string;\n\t\t$counter ++;\n\t}\n\t\t\t/*counter is used to count the photos found.\n\t\t\t\tIf counter is still 0 then no photos were found. */\n\tif ($counter == 0)\n\t{\n\t\techo \"There were no Lego sets by that set number. <br>\";\n\t}\n\t$mysqli->close();\n}", "public function getMetadataSet($set) {\n\t\treturn array();\n\t}", "public function getImageSet()\n {\n if (!$this->imageSet instanceof ImageSetStorage) {\n $this->imageSet = new ImageSetStorage($this->repository);\n }\n return $this->imageSet;\n }", "private function retrieveImageInfo() {\n $prepare = $this->database->prepare(\"\n SELECT image_height, image_width\n FROM manuscripts\n WHERE collection = :collection\n AND pointer = :pointer\n LIMIT 1\n \");\n\n $prepare->execute(array(\n \":collection\" => $this->collection,\n \":pointer\" => $this->pointer\n ));\n\n return $prepare->fetch(PDO::FETCH_ASSOC);\n }", "public function getImageDetails($id)\n {\n \tif(!$this->token)\n \t{\n \t\treturn parent::getImageDetails($id);\n \t}\n \t\n static $method = 'flickr.photos.getSizes';\n\n if (empty($id)) {\n /**\n * @see Zend_Service_Exception\n */\n require_once 'Zend/Service/Exception.php';\n throw new Zend_Service_Exception('You must supply a photo ID');\n }\n $options = array(\n \t'api_key' => $this->apiKey,\n \t'auth_token' => $this->token, \n \t'method' => $method, \n \t'photo_id' => $id\n );\n $options = $this->signOptions($this->secret, $options);\n\n $restClient = $this->getRestClient();\n $restClient->getHttpClient()->resetParameters();\n $response = $restClient->restGet('/services/rest/', $options);\n\n $dom = new DOMDocument();\n $dom->loadXML($response->getBody());\n $xpath = new DOMXPath($dom);\n self::_checkErrors($dom);\n $retval = array();\n /**\n * @see Zend_Service_Flickr_Image\n */\n require_once 'Zend/Service/Flickr/Image.php';\n foreach ($xpath->query('//size') as $size) {\n $label = (string) $size->getAttribute('label');\n $retval[$label] = new Zend_Service_Flickr_Image($size);\n }\n\n return $retval;\n }", "public function getAllPhotos();", "public function getPhoto()\n {\n return $this->execute('GET', '/' . self::PHOTO);\n }", "private static function getPhotos()\r\n {\r\n return self::getDoc()->getElementsByTagName('photo');\r\n }", "function photos_getInfo ($photo_id, $secret = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getInfo';\n\t\t$params['photo_id'] = $photo_id;\n\t\tif ($secret) $params['secret'] = $secret;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photo'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "function printSet($photoset_id, $packery = true, $parentNav = false, $size = 'n'){\n\n\t\t/* Gets Photo Info */\n\t\t$info = $this->getPhotoSetInfo($photoset_id);\n\n\t\t/* Redefine loadContentDescription */\n\t\t$this->pageDescription = $info->photoset->title->_content;\n\t\t$this->contentDescription = $info->photoset->description->_content;\n\n\t\t/* Add Content Description */\n\t\t$output = $parentNav ? '' : $this->printContentDescription();\n\n\t\t/* Start HTML */\n\t\tif(!$parentNav) $output .= '<section class=\"photogroup\"><div id=\"gallery\">';\n\n\t\t/* Check for Packery */\n\t\t$packery ? $packery = 'packery' : $packery = '';\n\t\t$output .= '<ul class=\"set '.$packery.'\">';\n\n\t\t/* Gets some photos */\n\t\t$photoSet = $this->getPhotoSet($photoset_id);\n\n\t\tforeach($photoSet->photoset->photo as $photo){\n\n\t\t\t/* Add Special Class to Primary */\n\t\t\t$primary = $photo->isprimary == '1' ? 'primary' : '';\n\n\t\t\t/* Add Video class if Video */\n\t\t\t$output .= '<li class=\"item '.$photo->media.' '.$primary.'\">';\n\t\t\t$output .= '<a class=\"imagelink\" href=\"#!/photo_id='.$photo->id.'&secret='.$photo->secret.'\">';\n\n\t\t\t/* Lets get some Photos */\n\t\t\tif($photo->media !== 'video' || $packery == false){ // Photos\n\n\t\t\t\t$info = $this->getPhoto($photo->id, $photo->secret);\n\n\t\t\t\t/* Check for Animated Gifs */\n\t\t\t\tif($info->photo->originalformat == 'gif') {\n\t\t\t\t\t$secret = $info->photo->originalsecret.'_o';\n\t\t\t\t\t$format = 'gif';\n\t\t\t\t} else {\n\t\t\t\t\t$secret = $photo->secret;\n\t\t\t\t\t$format = 'jpg';\n\t\t\t\t}\n\n\t\t\t\t$sizeUrl = 'url_'.$size;\n\t\t\t\t$url = isset($photo->$sizeUrl) ? $photo->$sizeUrl : 'http://farm'.$photo->farm.'.staticflickr.com/'.$photo->server.'/'.$photo->id.'_'.$secret.'.'.$format;\n\t\t\t\t$output .= '<img src=\"'.$url.'\" alt=\"'.$photo->title.'\">';\n\t\t\t} else {\n\n\t\t\t\t/* Videos Baby! */\n\t\t\t\t$output .= $this->printVideo($photo->id,$photo->secret,false);\n\t\t\t}\n\t\t\t$output .= '</a>';\n\t\t\t$output .= '</li>';\n\t\t}\n\t\t$output .= '</ul>';\n\t\t\n\t\tif(!$parentNav) $output .= '</div>';\n\n\t\t/* Add Parent Nav */\n\t\tif(!$parentNav) {\n\t\t\t$parentNav = $this->printSets(false);\n\t\t\t$output .= '<section class=\"parentnav\"><div class=\"before\">&laquo;</div>'.$parentNav.'<div class=\"after\">&raquo;</div></section>';\n\t\t\t$output .= '<nav class=\"pagenav\"><ul>'\n\t\t\t\t.'<li class=\"back\"><a href=\"#!/home\">&laquo; Back to Projects</a></li>'\n\t\t\t\t.'</ul></nav>';\n\t\t} else {\n\n\t\t\t$title = isset($parentNav->title) ? $parentNav->title : 'Projects';\n\t\t\t$link = isset($parentNav->id) ? strtolower(urlencode($parentNav->title)).'&amp;id='.$parentNav->id : '';\n\n\t\t\t$output = '<section class=\"parentnav\"><div class=\"before\">&laquo;</div>'.$output.'<div class=\"after\">&raquo;</div></section>';\n\t\t\t$output .= '<nav class=\"pagenav\"><ul>'\n\t\t\t\t.'<li class=\"back\"><a href=\"#!/set='.$link.'\">&laquo; Back to '.$title.'</a></li>'\n\t\t\t\t.'</ul></nav>';\n\t\t}\n\n\t\t/* End HTML */\n\t\tif(!$parentNav) $output .= '</section>';\n\n\t\t/* Output HTML */\n\t\treturn $output;\n\t}", "public function getFotos()\n\t{\n\t\treturn $this->fotos;\n\t}", "function getSets($user){\n\n\t\t/* Get Sets */\n\t\t$sets = $this->askFlickr('photosets.getList','&user_id='.$user.'&extras=url_o,url_z,url_l,url_q,url_t,url_n,url_s');\n\n\t\t/* Return Sets */\n\t\treturn $sets;\n\t}", "function GetImages(){\n\t\t$this->MediaType = 'image/jpeg';\n\t\t$this->SetFileName();\n\t\treturn $this->get();\n\t}", "function getSpecificPhoto($id) {\r\n App::import('Vendor', 'phpFlickr/phpFlickr');\r\n $flickr =& new phpFlickr(Configure::read('Flickr.settings.key'));\r\n return $flickr->photos_getSizes($id);\r\n }", "private function getPersonalPhotos()\n {\n if (!isset($this->personalPhotos)) {\n $individual = $this->getIndividual();\n $immediateFamily = $this->getImmediateFamily();\n $individuals = array_merge(array($individual), $immediateFamily);\n $this->personalPhotos = $this->getCommonUtility()->getIndividualsPersonalPhotos($individuals);\n }\n \n return $this->personalPhotos;\n }", "function tmt_gallery_get()\n\t{\n\t\t$galleries = $this->gallery_model->display_one_gallery();\n\t\t\n\t\t//$data = array('returned: '. $this->get('id'));\n\t\t$this->response($galleries);\n\t\t\n\t}", "public function getPhoto($id);" ]
[ "0.7983389", "0.7624878", "0.75235385", "0.71805054", "0.6704652", "0.652162", "0.6079326", "0.6019746", "0.5936873", "0.5889445", "0.5870294", "0.58312434", "0.5807532", "0.5791189", "0.57457685", "0.5726683", "0.5694535", "0.56459624", "0.5619843", "0.55982786", "0.5570566", "0.5540493", "0.5483874", "0.543947", "0.54150456", "0.54025984", "0.5372116", "0.5361323", "0.53463316", "0.5338272" ]
0.7850466
1
Returns the photosets belonging to the specified user.
function photosets_getList ($user_id = NULL) { $params = array(); $params['method'] = 'flickr.photosets.getList'; if ($user_id) $params['user_id'] = $user_id; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photosets']['photoset']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSets($user){\n\n\t\t/* Get Sets */\n\t\t$sets = $this->askFlickr('photosets.getList','&user_id='.$user.'&extras=url_o,url_z,url_l,url_q,url_t,url_n,url_s');\n\n\t\t/* Return Sets */\n\t\treturn $sets;\n\t}", "public function getPhotoPublications($user)\n {\n return $this->getByCategoryType('Photo', $user);\n }", "public static function get_photos_by_user($user_id) {\n\t\t$photos_array = array();\n\n\t\t$sql = \"SELECT * \n\t\t FROM photo_directory \n\t\t WHERE user_id = {$user_id}\n\t\t ORDER BY time_uploaded DESC;\";\n\t\t$photos_dbo = mysql_query($sql);\n\t\twhile ($row = mysql_fetch_assoc($photos_dbo)) {\n\t\t\tarray_push($photos_array, $row);\n\t\t} \n\n\t\tglobal $firephp;\n\t\t$firephp->log('get_photos_by_user:');\n\t\t$firephp->log($photos_array);\n\t\treturn $photos_array;\n\t}", "public function getAllUserAlbums($userId){\n $albums = DB::select('\n select albums.*\n from albums\n where albums.user_id = ?\n order by album_created_at', array($userId));\n return $albums;\n }", "public function getAllAvatarsByUser()\n {\n $userId = Auth::user()->id;\n $avatar = Avatar::select('image_url', 'id')->where('user_id', $userId)->get();\n return $avatar;\n }", "public function getUserimages()\n {\n return $this->hasMany(Userimage::className(), ['user_id' => 'id']);\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 function getMusicPublications($user)\n {\n return $this->getByCategoryType('Music', $user);\n }", "function getPhotoSet($photoset_id){\n\n\t\t/* Get Photoset */\n\t\t$photoset_object = $this->askFlickr('photosets.getPhotos','&photoset_id='.$photoset_id.'&extras=url_o,url_z,url_l,url_s,url_q,url_t,media');\n\n\t\t/* Return our Photoset Object */\n\t\treturn $photoset_object;\n\t}", "public function findPartnerCollections($user) {\n $table = $this->_db->getTable('Collection');\n $collections = $table->findBy(array('owner_id' => $user->id));\n return $collections;\n }", "public function getUserAlbums($user_id, $start, $page_size) {\n $query_params = array(\n 'columns' => 'id, name, description',\n 'where' => 'user_id = ?',\n 'orderby' => 'create_date DESC',\n 'limit' => '?, ?'\n );\n \n $bind_params = array($user_id, $start, $page_size);\n $albums = $this->find($query_params, $bind_params);\n \n return $albums;\n }", "public function findByOwners(User $user) {\r\n $qb = $this->createQueryBuilder('i');\r\n $qb = $this->qbByOwners($qb, $user);\r\n \r\n return $qb->getQuery()->getResult();\r\n }", "public static function getListAllCam($user_id = NULL){\n if(empty($user_id)){\n $user_id = Yii::$app->user->identity->id;\n if(empty($user_id)) return false;\n }\n $query = Camera::find()\n -> leftJoin('relations_cam_user', 'relations_cam_user.cam_id=camera.id')\n ->where(['=', 'relations_cam_user.user_id', $user_id])\n ->all();\n return $query;\n }", "function &getImages( $user, $category = false )\r\n {\r\n return eZImageCategory::images( \"time\", 0, -1, $category );\r\n }", "public function getPhotos($userid)\n {\n $stmt = $this->con->prepare(\"SELECT id_foto, caminho, disciplina, dataCreate FROM tbl_foto WHERE fk_usuario = ?\");\n $stmt->bind_param(\"i\", $userid);\n $stmt->execute();\n $stmt->bind_result($id, $caminho, $disciplina, $data);\n $photos = array();\n\n while ($stmt->fetch()) {\n $photo = array();\n $photo['id'] = $id;\n $photo['caminho'] = $caminho;\n $photo['disciplina'] = $disciplina;\n $photo['userid'] = $userid;\n $photo['data'] = $data;\n array_push($photos, $photo);\n }\n\n $stmt->close();\n return $photos;\n }", "public function filterOwnedBy($user)\n {\n return $this->getData()->filter($this->owner_field, $user);\n }", "public static function getCollections($user_id, $options = []) {\n\t\t$options = array_merge([\n\t\t\t'type' => 'all',\n\t\t\t'conditions' => []\n\t\t], $options);\n\n\t\t//Remove contain flag, all must be included!\n\t\tif (isset($options['contain'])) {\n\t\t\tunset($options['contain']);\n\t\t}\n\n\t\t//Conditions\n\t\t$options['conditions']['UserCollection.deleted'] = 0;\n\t\t$options['conditions']['UserCollection.revision_id'] = 0;\n\t\t$options['conditions']['UserCollection.user_id'] = $user_id;\n\n\t\treturn parent::$db->selectEx(new self(), $options);\n\t}", "public static function get_all( WP_User $user ) {\n\n\t\tglobal $wpdb;\n\n\t\t$mids = $wpdb->get_col( $wpdb->prepare(\n\t\t\t\"SELECT `umeta_id` FROM {$wpdb->usermeta} WHERE `meta_key` = %s AND `user_id` = %d\",\n\t\t\tself::META_KEY,\n\t\t\t$user->ID\n\t\t) );\n\n\t\t$sessions = array();\n\n\t\tforeach ( $mids as $meta_id ) {\n\t\t\tif ( ! is_wp_error( $session = self::get( $meta_id ) ) ) {\n\t\t\t\t$sessions[] = $session;\n\t\t\t}\n\t\t}\n\n\t\treturn $sessions;\n\t}", "function getUserPhotoAlbums($user_id=null,$profile_picture_album=false){\r\n\t\tif($user_id==null) return array();\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('user_id'=>$user_id));\r\n\t\tif($profile_picture_album==true)\r\n\t\t{\r\n\t\t\t$this->db->where(array('title'=>PROFILE_PICTURES));\t\t\r\n\t\t}\r\n\t\t$recordSet = $this->db->get(TBL_PHOTO_ALBUMS);\r\n\t\t$data=$recordSet->result() ;\r\n \t\treturn $data;\r\n\t}", "public static function listByUsers($user_id){\n $projects = Project::listByUsers($user_id);\n\n $project_ids = [];\n foreach ($projects as $project){\n $project_ids[] = $project->id;\n }\n $risks = static::whereIn('project_id', $project_ids);\n return $risks;\n }", "public function getFilesCurrentUser(User $user)\n {\n }", "public function getAllPublications($user)\n {\n return $this->getByUser($user);\n }", "function getFilesByUserId($user_id) {\r\n $sql = '\r\n SELECT\r\n *\r\n FROM\r\n files\r\n WHERE\r\n user_id = ?\r\n ORDER BY\r\n uuid DESC\r\n ';\r\n\r\n return $this->query_result($sql, array($user_id));\r\n }", "function getPhotosOfUser($idUser){\r\n\t\t$connectService = new ConnectionBDD();\r\n\t\t$connect = $connectService->connect();\r\n\t\t$tab = new Data();\r\n\t\t$r = mysql_query(\"select login from Utilisateur where id_user = \" . $idUser);\r\n\r\n\t\tif(mysql_num_rows($r) == 0){\r\n\t\t\treturn $tab;\r\n\t\t}\r\n\t\t$name = mysql_result($r,0,0);\r\n\t\t$connectService->close();\r\n\t\tif(!is_dir(\"../v2.0/espace/\" . $name . \"/photos/sd\")){\r\n\t\t\treturn $tab;\r\n\t\t}\r\n\r\n\t\t$tab->addInfo(\"root\",\"../v2.0/espace/\" . $name . \"/photos\");\r\n\t\t$tab->addInfo(\"photos\",$this->getPhotosOfDir($tab->getInfo(\"root\")));\r\n\t\t$tab->addInfo(\"type\",\"scan\");\r\n\r\n\t\treturn $tab;\r\n\t}", "static public function getOwnerCriteria($user)\n {\n $criteria = array('user:' . $user);\n $mygroups = $GLOBALS['injector']\n ->getInstance('Horde_Group')\n ->listGroups($GLOBALS['registry']->getAuth());\n foreach ($mygroups as $id => $group) {\n $criteria[] = 'group:' . $id;\n }\n return $criteria;\n }", "function get_user_images($user_id) {\n $images = DAO_user::DAO_fetch_user_images($user_id);\n if (is_array($images)) {\n $i = 0;\n $result = array();\n foreach ($images as $image) {\n $result[$i++] = $image;\n }\n return $result;\n }\n else return -1;\n }", "public function getFullObjects(UserGroup $userGroup)\n {\n $images = $userGroup->getAssignedObjects(self::OBJECT_TYPE);\n $galleries = $userGroup->getAssignedObjects(Gallery::OBJECT_TYPE);\n $albums = $userGroup->getAssignedObjects('nggAlbum');\n\n foreach ($albums as $albumId => $albumType) {\n $albumPictures = $this->nextGenGallery->find_images_in_album($albumId);\n }\n\n foreach ($galleries as $galleryId => $galleryType) {\n $galleryImages = $this->nextGenGallery->getImagesByGallery($galleryId);\n }\n\n return $images;\n }", "public function getGamesByUserUID( $userUID ){\n\t\n\t\t//Run a find to get the user and all of their associated games\n\t\t$games = $this->find( 'all', [\n\t\t\t\t\t\t\t\t'conditions' => [\n\t\t\t\t\t\t\t\t\t'UserGame.users_uid' => $userUID,\n\t\t\t\t\t\t\t\t\t'Game.active' => 1\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t'joins' => [\n\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t'table' => 'games',\n\t\t\t\t\t\t\t\t\t\t'alias' => 'Game',\n\t\t\t\t\t\t\t\t\t\t'type' => 'inner',\n\t\t\t\t\t\t\t\t\t\t'conditions' => [\n\t\t\t\t\t\t\t\t\t\t\t'Game.uid = UserGame.games_uid'\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\t'recursive' => -1\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\n\t\t//Return the games we found\t\n\t\treturn $games;\n\t\n\t}", "public function getBlocks($user)\n\t{\n\t\t$staff = $user->staff;\n\n\t\t// Start an array for storing the blocks\n\t\t$blocks = array();\n\n\t\tif ($staff)\n\t\t{\n\t\t\tif ($staff->appointments->count() > 0)\n\t\t\t{\n\t\t\t\t// Get today\n\t\t\t\t$today = Date::now();\n\n\t\t\t\treturn $staff->appointments->filter(function($a) use ($today)\n\t\t\t\t{\n\t\t\t\t\treturn (int) $a->service_id === 1 and $a->start->startOfDay() >= $today->startOfDay();\n\t\t\t\t})->sortBy(function($a)\n\t\t\t\t{\n\t\t\t\t\treturn $a->start;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn new Collection;\n\t\t}\n\n\t\treturn new Collection;\n\t}", "public function findOther($user): array\n {\n return $this->createQueryBuilder('c')\n ->where('c.creator != :user')\n ->andWhere('c.private = false')\n ->setParameter('user', $user )\n ->setMaxResults(4)\n ->getQuery()\n ->getResult();\n }" ]
[ "0.76590306", "0.69626945", "0.6388711", "0.59604466", "0.5868237", "0.5824793", "0.58002084", "0.5741096", "0.57019824", "0.5700303", "0.5661259", "0.5622172", "0.56107265", "0.5604882", "0.55912995", "0.55279803", "0.55277044", "0.55081683", "0.54907244", "0.548561", "0.5483802", "0.547936", "0.5474477", "0.5462978", "0.5451737", "0.5418412", "0.5410218", "0.5390644", "0.5352495", "0.5350298" ]
0.7680268
0
Get the list of photos in a set.
function photosets_getPhotos ($photoset_id, $per_page = 25, $page = 1, $media = 'photos', $extras = NULL) { $params = array(); $params['method'] = 'flickr.photosets.getPhotos'; $params['photoset_id'] = $photoset_id; $params['per_page'] = $per_page; $params['page'] = $page; $params['media'] = $media; if ($extras) $params['extras'] = $extras; $response = $this->execute($params); $object = unserialize($response); if ($object['stat'] == 'ok') { return $object['photoset']; } else { $this->setError($object['message'], $object['code']); return NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function photosets_getList ($user_id = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photosets']['photoset'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getPhotos();", "function getPhotoSet($photoset_id){\n\n\t\t/* Get Photoset */\n\t\t$photoset_object = $this->askFlickr('photosets.getPhotos','&photoset_id='.$photoset_id.'&extras=url_o,url_z,url_l,url_s,url_q,url_t,media');\n\n\t\t/* Return our Photoset Object */\n\t\treturn $photoset_object;\n\t}", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "public function getAllPhotos();", "public function getPhotos()\n {\n return $this->photos;\n }", "public function photos()\n {\n return $this->morphedByMany(Photo::class, 'taggable');\n }", "private static function getPhotos()\r\n {\r\n return self::getDoc()->getElementsByTagName('photo');\r\n }", "public function getPhotos()\n {\n return $this->hasMany(Photo::className(), ['owner_id' => 'id']);\n }", "public function getUnsplashCollectionPhotos(){\n $images = $this->unsplash->unsplashCollectionPhotos();\n return $images;\n }", "function photos_getNotInSet ($per_page = 25, $page = 1, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = 1, $media = 'all', $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getNotInSet';\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($min_upload_date) $params['min_upload_date'] = $min_upload_date;\n\t\tif ($max_upload_date) $params['max_upload_date'] = $max_upload_date;\n\t\tif ($min_taken_date) $params['min_taken_date'] = $min_taken_date;\n\t\tif ($max_taken_date) $params['max_taken_date'] = $max_taken_date;\n\t\tif ($privacy_filter) $params['privacy_filter'] = $privacy_filter;\n\t\tif ($media) $params['media'] = $media;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getFotos()\n\t{\n\t\treturn $this->fotos;\n\t}", "public function Images() {\n\t\treturn new ArrayList(array_filter([$this->Image()]));\n\t}", "public function photos()\n {\n return $this->morphMany(Photo::class, \"viewable\");\n }", "public function getPhotos($page, $itemsPerPage);", "public function getPhotos($album_uid) {\r\n\t\t$photos = tx_cwtcommunity_lib_common::dbQuery('SELECT * FROM tx_cwtcommunity_photos p WHERE album_uid = \"'.intval($album_uid).'\" AND NOT deleted = \"1\" AND NOT hidden = 1 ORDER BY crdate ASC;');\r\n\t\treturn $photos;\r\n\t}", "public function getPhotoUrls () {\n\t\t\n\t}", "private function getPictures( $count ){\n\t\t$flickr_group_id = Yii::$app->params['flickr-group-id'];\n\t\t$flickr_api_key = Yii::$app->params['flickr-api-key'];\n\n\t\t$flickr_url = 'https://api.flickr.com/services/rest/?method=flickr.groups.pools.getPhotos&api_key=' . urlencode( $flickr_api_key ) . '&group_id=' . urlencode($flickr_group_id) . '&per_page=' . urlencode($count) . '&format=json&nojsoncallback=1&extras=url_q';\n\t\t$json_array = $this->getFromApi( $flickr_url );\n\n\t\tif( isset($json_array['photos']) && isset($json_array['photos']['photo']) ){\n\t\t\tif( isset($_GET['debug']) ){\n\t\t\t\tvar_dump($json_array['photos']['photo']);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\treturn $json_array['photos']['photo'];\n\t\t}\n\n\t\treturn array();\n\t}", "public function getPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "function find_public_photos($ids_of_private_photos, $ids_of_all_users_photos_on_page)\n{\n $public_photos = [];\n\n foreach ($ids_of_all_users_photos_on_page as $photo_id)\n if (!in_array($photo_id, $ids_of_private_photos))\n array_push($public_photos, $photo_id);\n\n return $public_photos;\n}", "public function getAll()\n {\n $query = $this->getQueryBuilder()->select('*')\n ->from($this->table);\n\n if ($photos = $this->db->get_results($query->build())) {\n foreach ($photos as $index => $photo) {\n $photos[$index] = $this->extend($photo);\n }\n }\n\n return $photos;\n }", "function getSets($user){\n\n\t\t/* Get Sets */\n\t\t$sets = $this->askFlickr('photosets.getList','&user_id='.$user.'&extras=url_o,url_z,url_l,url_q,url_t,url_n,url_s');\n\n\t\t/* Return Sets */\n\t\treturn $sets;\n\t}", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function getPictures()\n {\n\n return $this->pictures;\n }", "public function getOrderedPhotos()\n {\n return $this->photos()->orderBy( 'photo_node.ordering', 'asc')->get();\n }", "public function get_photos($args = array())\r\n\t{\r\n\t\tif(empty($args))\r\n\t\t{\r\n\t\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"?kind=photo&max-results=10\");\r\n\t\t}\r\n\t\telseif(isset($args['album']))\r\n\t\t{\r\n\t\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"/albumid/\" . $args['album'] . \"?prettyprint=true\");\r\n\t\t}\r\n\t\telseif(isset($args['tag']))\r\n\t\t{\r\n\t\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"?kind=photo&tag=\" . $args['tag'] . \"&prettyprint=true\");\r\n\t\t}\r\n\t\treturn $xml;\r\n\t}", "public function getImages() : array\n\t{\n\t\treturn $this->images_list;\n\t}", "public function getPhotos()\n {\n try {\n if (!$this->profileUrl) {\n throw new Exception(\"The profile url is empty.\", self::ERROR_PROFILE_URL_EMPTY);\n }\n $html = $this->getHtmlProfile();\n $photoList = $this->getPhotoList($html);\n } catch (Exception $e) {\n $photoList = array();\n $this->errorCode = $e->getCode();\n $this->errorMessage = $e->getMessage();\n }\n\n return $photoList;\n }", "public function photos()\n {\n return $this->morphToMany(\n 'App\\RentalManager\\AddOns\\Photo', // model\n 'node', // node\n 'photo_node', // table\n 'node_id',\n 'photo_id'\n );\n }", "public static function find_all_photos(){\n global $db;\n $sql = \"SELECT * FROM photos\";\n try {\n $result = $db->query($sql);\n $rows=$result->fetchall();\n return $rows;\n } catch (Exception $e) {\n throw $e;\n }\n }" ]
[ "0.6997282", "0.6981816", "0.68711984", "0.6827155", "0.6631159", "0.66159064", "0.6368315", "0.62825346", "0.6200157", "0.6183843", "0.6086158", "0.6067024", "0.6031689", "0.6024305", "0.5999499", "0.5995712", "0.5983647", "0.5953357", "0.5949816", "0.5937779", "0.59330195", "0.5928024", "0.5919159", "0.5884448", "0.58807665", "0.58753574", "0.58315206", "0.5815173", "0.57952684", "0.5778142" ]
0.745263
0
Set the order of photosets for the calling user.
function photosets_orderSets ($photoset_ids) { $params['method'] = 'flickr.photosets.orderSets'; $response = $this->execute(array('method' => 'flickr.photosets.orderSets', 'photoset_ids' => $photoset_ids), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sort() {\n\t\tif ($this->request->is('post')) {\n\t\t\t$order = explode(\",\", $_POST['order']);\n\t\t\t$i = 1;\n\t\t\tforeach ($order as $photo) {\n\t\t\t\t$this->Picture->read(null, $photo);\n\t\t\t\t$this->Picture->set('order', $i);\n\t\t\t\t$this->Picture->save();\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\t$this->render(false, false);\n\t}", "protected function prepareThreePhotosInPublicAlbum(): void\n\t{\n\t\t$this->albumID1 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_1)->offsetGet('id');\n\t\t$this->photoID1 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->photoID2 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->photoID3 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_SUNSET_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->albums_tests->set_protection_policy($this->albumID1);\n\t\t$this->photos_tests->set_star([$this->photoID1], true);\n\t\tAuth::logout();\n\t\tSession::flush();\n\t\t$this->clearCachedSmartAlbums();\n\t\t$this->performPostPreparatorySteps();\n\t}", "public function getOrderedPhotos()\n {\n return $this->photos()->orderBy( 'photo_node.ordering', 'asc')->get();\n }", "protected function preparePublicUnsortedPhotoAndPhotoInSharedAlbum(): void\n\t{\n\t\t$this->albumID1 = $this->albums_tests->add(null, TestConstants::ALBUM_TITLE_1)->offsetGet('id');\n\t\t$this->photoID1 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE))->offsetGet('id');\n\t\t$this->photoID2 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE), $this->albumID1)->offsetGet('id');\n\t\t$this->sharing_tests->add([$this->albumID1], [$this->userID]);\n\t\t$this->photos_tests->set_public($this->photoID1, true);\n\t\t$this->photos_tests->set_star([$this->photoID1, $this->photoID2], true);\n\t\tAuth::logout();\n\t\tSession::flush();\n\t\t$this->clearCachedSmartAlbums();\n\t\t$this->performPostPreparatorySteps();\n\t}", "public function setSorting(SetAlbumSortingRequest $request): void\n\t{\n\t\t$request->album()->sorting = $request->sortingCriterion();\n\t\t$request->album()->save();\n\t}", "function photosets_getList ($user_id = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photosets.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photosets']['photoset'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function setPhotos($value)\n {\n $this->photos = $value;\n }", "protected function prepareUnsortedPublicAndPrivatePhoto(): void\n\t{\n\t\t$this->photoID1 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_TRAIN_IMAGE))->offsetGet('id');\n\t\t$this->photoID2 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE))->offsetGet('id');\n\t\t$this->photos_tests->set_public($this->photoID1, true);\n\t\t$this->photos_tests->set_star([$this->photoID1], true);\n\t\tAuth::logout();\n\t\tSession::flush();\n\t\t$this->clearCachedSmartAlbums();\n\t\t$this->performPostPreparatorySteps();\n\t}", "protected function prepareUnsortedPrivatePhoto(): void\n\t{\n\t\t$this->photoID1 = $this->photos_tests->upload(static::createUploadedFile(TestConstants::SAMPLE_FILE_MONGOLIA_IMAGE))->offsetGet('id');\n\t\tAuth::logout();\n\t\tSession::flush();\n\t\t$this->clearCachedSmartAlbums();\n\t\t$this->performPostPreparatorySteps();\n\t}", "function getSets($user){\n\n\t\t/* Get Sets */\n\t\t$sets = $this->askFlickr('photosets.getList','&user_id='.$user.'&extras=url_o,url_z,url_l,url_q,url_t,url_n,url_s');\n\n\t\t/* Return Sets */\n\t\treturn $sets;\n\t}", "public static function setSortOrder(int $userID) {\n $books = static::where('user_id', $userID)\n ->orderBy('sort_order', 'asc')\n ->get();\n\n $sortOrder = 0;\n\n foreach($books as $book) {\n $book->sort_order = $sortOrder;\n $book->save();\n $sortOrder += 10;\n }\n }", "function setOrder($order);", "public function action_block_content_photoset_randomphotos($block)\n\t{\n\t\t$assets = array();\n\t\t$posts = Posts::get(array('content_type' => Post::type('photoset'), 'status' => Post::status('published')));\n\t\tforeach($posts as $post) {\n\t\t\tforeach(explode(\"\\n\", $post->content_media) as $asset) {\n\t\t\t\t$assets[] = $asset;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$photos = array();\n\t\t$photocount = Options::get(__CLASS__ . '__randomphotosblock_count', 8);\n\t\tif(count($assets) >= $photocount) {\n\t\t\twhile(count($photos) < $photocount) {\n\t\t\t\t// By using the output as index duplicates are impossible\n\t\t\t\t$random = $assets[array_rand($assets)];\n\t\t\t\t$photos[$random] = $random;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$block->photos = $photos;\n\t}", "function albums_reorder_images($album) {\n\t$images = albums_get_images($album);\n\n\t//Only reorder if album contains images.\n\tif ($images != FALSE) {\n\t\t$number = 1;\n\t\tforeach ($images as $image) {\n\t\t\t$parts = explode('.', $image['filename']);\n\t\t\tif (isset($parts[3])) {\n\t\t\t\trename(ALBUMS_DIR.'/'.$album.'/'.$image['filename'], ALBUMS_DIR.'/'.$album.'/'.$number.'.'.$parts[1].'.'.$parts[2].'.'.$parts[3]);\n\t\t\t\t$number++;\n\t\t\t}\n\t\t}\n\t}\n}", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"uploads\";\n $destination_path = \"products\";\n\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n }", "public static function renumberPostionsToAccountForNewlyDeletedPhotos()\n {\n $position = 1;\n $photos = parent::whereUserId(auth()->id())->orderBy('position')->orderBy('updated_at')->get();\n foreach ($photos as $photo) {\n $photo->update(['position' => $position]);\n $position++;\n }\n }", "public function setPhotosAttribute($value)\n {\n $attribute_name = \"photos\";\n $disk = \"public_folder\";\n $destination_path = \"uploads/albums\";\n $album_originalName = $_POST['name'];\n // ******** Generate unique album name ********\n $album_name = md5( $album_originalName . time() );\n \n foreach ( $value as $file ) {\n // 0. Generate new size file\n $image = \\Image::make( $file );\n $image_350 = \\Image::make( $file ) -> widen( 350 );\n \n // 1. Generate new file names\n $new_file_name = md5( $file -> getClientOriginalName() . time() ).'.'.$file->getClientOriginalExtension();\n $new_file_name_350 = md5( $file -> getClientOriginalName() . time() ).'_350.'.$file->getClientOriginalExtension();\n \n // 2. Move new files to the correct path\n $file_path = $destination_path . '/' . $album_name . '/' . $new_file_name;\n $file_path_350 = $destination_path . '/' . $album_name . '/' . $new_file_name_350;\n \\Storage::disk( $disk )->put( $file_path, $image -> stream() );\n \\Storage::disk( $disk )->put( $file_path_350, $image_350 -> stream() );\n \n // 3. Add the public path to the database\n $attribute_value[] = [ $file_path, $file_path_350 ];\n }\n $this->attributes[$attribute_name] = str_replace( '\\\\', '', json_encode($attribute_value) );\n }", "function photos_setPerms ($photo_id, $is_public = 1, $is_friend = 0, $is_family = 0, $perm_comment = 3, $perm_addmeta = 3) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.setPerms', 'photo_id' => $photo_id, 'is_public' => $is_public, 'is_friend' => $is_friend, 'is_family' => $is_family, 'perm_comment' => $perm_comment, 'perm_addmeta' => $perm_addmeta));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function setPhotoData($body) {\n\t\t$cnt = count($body['photos']['photo']);\n\t\t$num = rand(0, $cnt-1);\n\t\t$this->photo = $body['photos']['photo'][$num];\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->userlevelid); // userlevelid\n\t\t\t$this->UpdateSort($this->userlevelname); // userlevelname\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function actionOrder()\n {\n if (Yii::app()->getRequest()->getIsPostRequest()) {\n $gp = $_POST['order'];\n $orders = array();\n $i = 0;\n foreach ($gp as $k => $v) {\n if (!$v) $gp[$k] = $k;\n $orders[] = $gp[$k];\n $i++;\n }\n sort($orders);\n $i = 0;\n foreach ($gp as $k => $v) {\n /** @var $p GalleryPhoto */\n $p = GalleryPhoto::model()->findByPk($k);\n $p->rank = $orders[$i];\n $p->save(false);\n $i++;\n }\n if ($_POST['ajax'] == true) {\n echo CJSON::encode(array('result' => 'ok'));\n } else {\n $this->redirect($_POST['returnUrl']);\n }\n } else\n throw new CHttpException(403);\n }", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}", "public function setUp(): void\n {\n parent::setUp();\n $user = factory(User::class)->create();\n // Create album with 5 pictures in each.\n factory(Album::class)->create(['user_id' => $user->id])\n ->each(function ($album) use ($user) {\n $album->pictures()->attach(factory(Picture::class, 5)->create(['user_id' => $user->id]));\n });\n }", "public function save_items_order() {\n\t\n\t\t\tparse_str( $_REQUEST[ 'order' ], $order );\n\t\n\t\t\techo update_post_meta( intval( $_REQUEST[ 'gallery_id' ] ), 'items_order', $order );\n\t\n\t\t\texit;\n\t\t}", "function SetUpSortOrder() {\n\t\tglobal $tbl_slide;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$tbl_slide->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$tbl_slide->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->title); // title\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->images); // images\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->order_by); // order_by\n\t\t\t$tbl_slide->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function setUserSortOrder($userSortOrder)\n {\n $this->userSortOrder = $userSortOrder;\n return $this;\n }", "public function setIdentityCardPhotosAttribute($value)\n {\n $attribute_name = \"identity_card_photos\";\n $disk = 'contects';\n $destination_path = \"contects/images\";\n\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n }", "public function setUser($value)\n {\n if ($value !== null) {\n $this->_user = $value;\n } else {\n $this->_user = Zend_Gdata_Photos::DEFAULT_USER;\n }\n }", "function set_user_metaboxes( $user_id = NULL ) {\n\t\t$meta_key[ 'order' ] = 'meta-box-order_post';\n\t\t$meta_key[ 'hidden' ] = 'metaboxhidden_post';\n\t\t// So this can be used without hooking into user_register\n\t\tif ( !$user_id )\n\t\t\t$user_id = get_current_user_id();\n\t\t// Set the default order if it has not been set yet\n\t\tif ( !get_user_meta( $user_id, $meta_key[ 'order' ], true ) ) {\n\t\t\t//if ( current_user_can( 'limited_editor' ) ) {\n\t\t\t$meta_value = array(\n\t\t\t\t'side' => 'submitdiv,formatdiv,postimagediv',\n\t\t\t\t'normal' => 'postexcerpt,tagsdiv-post_tag,postcustom,commentstatusdiv,commentsdiv,trackbacksdiv,slugdiv,authordiv,revisionsdiv',\n\t\t\t\t'advanced' => '',\n\t\t\t);\n\t\t\tupdate_user_meta( $user_id, $meta_key[ 'order' ], $meta_value );\n\t\t}\n\t\t// Set the default hiddens if it has not been set yet\n\t\tif ( !get_user_meta( $user_id, $meta_key[ 'hidden' ], true ) ) {\n\t\t\t$meta_value = array( 'categorydiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'slugdiv', 'authordiv', 'revisionsdiv' );\n\t\t\tupdate_user_meta( $user_id, $meta_key[ 'hidden' ], $meta_value );\n\t\t}\n\t}", "public static function setImageOrder($db, $databaseColumn, $order, $image)\r\n\t\t\t{\r\n\t\t\t\tif(!is_array($order))\r\n\t\t\t\t{\r\n\t\t\t\t\t//echo \"your order is not an array\";\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$newOrder = array();\r\n\t\t\t\t\r\n\t\t\t\t//echo \"here at imageorder\";\r\n\t\t\t\tforeach($order as $image_id)\r\n\t\t\t\t{\r\n\t\t\t\t\t//echo \"image id is: \".$image_id;\r\n\t\t\t\t\tif(array_key_exists($image_id, $image))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//echo \"image id is: \".$image_id;\r\n\t\t\t\t\t\t$newOrder[]=$image_id;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$newOrder = array_unique($newOrder);\r\n\t\t\t\t//echo 'neworder is: ';\r\n\t\t\t\t//Zend_Debug::dump($newOrder);\r\n\t\t\t\t//echo 'images are: ';\r\n\t\t\t\t//Zend_Debug::dump($image);\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(count($newOrder) != count($image))\r\n\t\t\t\t{\r\n\t\t\t\t\t//echo 'here at not equal';\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$rank =1;\r\n\t\t\t\t\r\n\t\t\t\t//echo count($newOrder);\r\n\t\t\t\t//echo \"<br/>at foreach\";\r\n\t\t\t\tforeach($newOrder as $image_id)\r\n\t\t\t\t{\r\n\t\t\t\t\t//echo \"<br/>before update\";\r\n\t\t\t\t\t//echo \"here at update image: $image_id, rank: $rank<br/>\";\r\n\t\t\t\t\t$db->update($databaseColumn, array('ranking'=>$rank), 'image_id='.$image_id);\r\n\t\t\t\t\t//echo \"at update\";\r\n\t\t\t\t\t$rank++;\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t}" ]
[ "0.57265484", "0.5364102", "0.5222773", "0.5144624", "0.51373714", "0.50431395", "0.50330323", "0.503229", "0.5030027", "0.49997965", "0.49879122", "0.49300522", "0.4914934", "0.49133882", "0.49124557", "0.48993564", "0.48892644", "0.48674384", "0.48394945", "0.4815727", "0.48143703", "0.48044467", "0.48028195", "0.4779268", "0.47548217", "0.47370186", "0.47156388", "0.47105876", "0.46973118", "0.46964616" ]
0.60841894
0
Remove a photo from a photoset.
function photosets_removePhoto ($photoset_id, $photo_id) { $params['method'] = 'flickr.photosets.orderSets'; $response = $this->execute(array('method' => 'flickr.photosets.removePhoto', 'photoset_id' => $photoset_id, 'photo_id' => $photo_id), 10); $object = unserialize($response); if ($object['stat'] == 'ok') { return TRUE; } else { $this->setError($object['message'], $object['code']); return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove()\n\t{\n\t\t$photosTable = PTA_DB_Table::get('Catalog_Product_Photo');\n\t\t$photos = (array)$photosTable->getPhotos($this->_id);\n\n\t\tif (parent::remove()) {\n\t\t\t$photoFileField = $photosTable->getFieldByAlias('photo');\n\t\t\tforeach ($photos as $photo) {\n\t\t\t\tPTA_Util::unlink(PTA_CONTENT_PATH . '/' . $photo[$photoFileField]);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function removePhoto($value)\n {\n $key = array_search($value, $this->photos);\n if($key !== false) {\n unset($this->photos[$key]);\n }\n }", "public function removeAction() {\r\n if (empty($_POST['photo_id']))\r\n die('error');\r\n //GET PHOTO ID AND ITEM\r\n $photo_id = (int) $this->_getParam('photo_id');\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n $db = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n $photo->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "public function delete_photo(){\n $sql=\"DELETE FROM photos WHERE id=\".$this->id;\n self::$connect->query($sql);\n\n }", "function photo_remove() {\n if ( ! $this->input->is_ajax_request() || ! $this->auth->is_login()) {\n return redirect(config_item('site_url'));\n }\n \n $item = filter($this->uri->segment(3), 'str', 40);\n $photo = $this->media->get_by_id($item);\n \n if ( ! $photo || empty($photo)) {\n log_write(LOG_WARNING, 'Photo not found, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n \n if ($photo->item_author != $this->auth->get_user_id()) {\n log_write(LOG_ERR, 'User is not the author of the photo, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n\n $image = explode('.', $photo->item_filename);\n\n unlink(FCPATH . '/uploads/' . $photo->item_point . '/' . $image[0] . '_thumb.' . $image[1]);\n unlink(FCPATH . '/uploads/' . $photo->item_point . '/' . $image[0] . '.' . $image[1]);\n\n $this->media->remove($item);\n \n return $this->output->set_output(json_encode(array(\n 'code' => 'luck'\n )));\n }", "public function DeletePhotos()\n\t{\tforeach ($this->imagesizes as $sizename=>$size)\n\t\t{\t@unlink($this->GetImageFile($sizename));\n\t\t}\n\t}", "public function remove_image() {\n\t\t$this->join_name = \"images\";\n\t\t$this->use_layout=false;\n\t\t$this->page = new $this->model_class(Request::get('id'));\n\t\t$image = new WildfireFile($this->param(\"image\"));\n\t\t$this->page->images->unlink($image);\n\t}", "function _delete_photo($file){\n\t\t@unlink('web/upload/'.image_small($file));\n\t\t@unlink('web/upload/'.image_large($file));\n\t}", "function photos_delete ($photo_id) {\n $response = $this->execute(array('method' => 'flickr.photos.delete', 'photo_id' => $photo_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function removePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id');\n\n //GET LISTING ITEM\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n //GET FILE ID\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n //DELETE PHOTO\n if (!empty($file_id)) {\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n $photo->delete();\n }\n\n //SET PHOTO ID TO ZERO\n $sitereview->photo_id = 0;\n $sitereview->save();\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "function favorites_remove ($photo_id) {\n $response = $this->execute(array('method' => 'flickr.favorites.remove', 'photo_id' => $photo_id), 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function delete_image() {\n\tif(isset($_POST['remove'])){\n\t\tglobal $wpdb;\n\t\t$img_path = $_POST['path'];\n\n\t\t// We need to get the images meta ID.\n\t\t$query = \"SELECT ID FROM wp_posts where guid = '\" . esc_url($img_path) . \"' AND post_type = 'attachment'\";\n\t\t$results = $wpdb->get_results($query);\n\n\t\t// And delete it\n\t\tforeach ( $results as $row ) {\n\t\t\twp_delete_attachment( $row->ID ); //delete the image and also delete the attachment from the Media Library.\n\t\t}\n\t\tdelete_option('pochomaps_map_image'); //delete image path from database.\n\t}\n}", "function removeImage() {\n\t\t\n $image = $this->getImageByImageId();\n \n $file_image = $this->dir_path.$image['path_image'];\n\n $this->deleteImage(array('image_id' => $image['image_id'] ));\n\n if(file_exists($file_image)) {\n @unlink($file_image);\n }\n\t\t\n\t}", "public function removeImage()\n {\n // Suppression de l'image principale\n $fichier = $this->getAbsolutePath();\n\n if (file_exists($fichier))\n {\n unlink($fichier);\n }\n\n // Suppression des thumbnails\n foreach($this->thumbnails as $key => $thumbnail)\n {\n $thumb = $this->getUploadRootDir() . '/' . $key . '-' . $this->name;\n if (file_exists($thumb))\n {\n unlink($thumb);\n }\n }\n }", "public function delete_photo ($photo_id){\n\t\t$q_extension = \"SELECT extension FROM photos WHERE photo_id =\".$photo_id;\t\n\t\t$q_photo = 'WHERE photo_id = '.$photo_id;\n\t\t#delete photo record from database\n\t\t\t\n\t\t$ext = DB::instance(DB_NAME)->select_field($q_extension);\n\t\tDB::instance(DB_NAME)->delete('photos', $q_photo);\t\t\n\t\t//delete photo from uploads images folder\n\t\tunlink(\"uploads/images/\".$photo_id.\".\".$ext);\n\t\t#send user back to message index\n\t\tRouter::redirect(\"/photos/gallery\");\n\t\n\t}", "public function removeImage() {\n //check if we have an old image\n if ($this->image) {\n //store the old name to delete the image on the upadate\n $this->temp = $this->image;\n //delete the current image\n $this->setImage(NULL);\n }\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function remove(array $images) {\n foreach ($images as $id) {\n if (isset($this->_images[$id])) {\n unset($this->_images[$id]);\n }\n }\n }", "public function removePhoto($value)\n {\n if($value == 'photo0')\n return $this->photo0 = '';\n if($value == 'photo1')\n return $this->photo1='';\n if($value == 'photo2')\n return $this->photo2='';\n if($value == 'photo3')\n return $this->photo3 = '';\n if($value == 'photo4')\n return $this->photo4='';\n if($value == 'photo5')\n return $this->photo5='';\n\n }", "function imageDelete($property);", "public function destroy_photo($id)\n {\n //\n if(File::exists(public_path('files/products_img/'.Photo::find($id)->name)))\n {\n File::delete(public_path('files/products_img/'.Photo::find($id)->name));\n Photo::find($id)->delete();\n return redirect()->back();\n }\n }", "function photos_removeTag ($tag_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.removeTag', 'tag_id' => $tag_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "protected function _delete()\n {\n $photoTable = Engine_Api::_()->getItemTable('socialstore_product_photo');\n $photoSelect = $photoTable->select()->where('album_id = ?', $this->getIdentity());\n foreach( $photoTable->fetchAll($photoSelect) as $productPhoto ) {\n $productPhoto->delete();\n }\n\n parent::_delete();\n }", "public function destroy(Photo $photo)\n {\n //\n }", "public function destroy(Photo $photo)\n {\n //\n }", "public function removeUpload()\n {\n $this->picture = null;\n }", "private function deletePhoto()\n {\n try \n {\n global $cbphoto;\n \n $request = $_REQUEST;\n \n if(!isset($request['photo_id']) || $request['photo_id']==\"\" )\n throw_error_msg(\"photo id not provided\");\n\n if( !is_numeric($request['photo_id']) )\n throw_error_msg(\"invalid photo id\");\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\")); \n\n $id = (int)$request['photo_id'];\n $photo = $cbphoto->get_photo($id);\n\n if(!$photo)\n {\n throw_error_msg(lang(\"photo_not_exists\"));\n }\n else\n {\n if($photo['userid']!=userid())\n throw_error_msg(\"You don't have enough permission to delete this photo\");\n } \n \n $cbphoto->delete_photo($id); \n \n if( error() )\n {\n if(error('single')!=\"Photo does not exist in this collection\")\n {\n throw_error_msg(error('single')); \n } \n else\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"photo deleted successfully\", \"data\" => array());\n $this->response($this->json($data)); \n } \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"photo deleted successfully\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n } \n }" ]
[ "0.70054024", "0.683811", "0.6623904", "0.66115767", "0.6547519", "0.6327626", "0.6278144", "0.6216093", "0.6189883", "0.6186994", "0.61034226", "0.5992519", "0.5980534", "0.5953017", "0.59094036", "0.58949935", "0.58870465", "0.58870465", "0.58870465", "0.58870465", "0.5885311", "0.58518106", "0.57646966", "0.5759809", "0.5752714", "0.57186276", "0.57141316", "0.57141316", "0.5695097", "0.56666" ]
0.8023547
0
Get direct photo url for all available sizes
public function getPhotoUrls () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImageURL($size = 'original') {\n\t\treturn $this->_config['images']['base_url'] . $size;\n\t}", "public function getThumbnailUrl();", "public function getFirstPhotoURL( $size = \"300\" ){\n $pics = $this->getPhotos();\n return $pics[0][\"Uri{$size}\"];\n }", "function imageUrl($property, $size = null);", "public function getProfileImage($size)\n {\n $socialAuths = $this->getSocialAuths();\n\n if (isset($socialAuths)) {\n foreach ($socialAuths as $socialAuth) {\n if ($socialAuth->getPlatform() == 'facebook') {\n switch ($size) {\n case 'small': // 50px x 50px\n return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=square';\n break;\n case 'medium': // 200px x 200px\n return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=large';\n break;\n case 'large': // 200px x 200px\n return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=large';\n break;\n default:\n return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture';\n break;\n }\n } elseif ($socialAuth->getPlatform() == 'onebody') {\n $baseUrl = getConfig()['auth']['onebody']['url'];\n $photoFingerprint = $socialAuth->getMeta()['photo-fingerprint'];\n if (empty($photoFingerprint) || !is_string($photoFingerprint)) {\n // OneBody doesn't actually have a photo (or we don't know its URL)\n continue;\n }\n $extension = pathinfo($socialAuth->getMeta()['photo-file-name'], PATHINFO_EXTENSION);\n switch ($size) {\n case 'small': // 50px x 50px\n return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/tn/'.$photoFingerprint.'.'.$extension;\n break;\n case 'medium': // 150px x 150px\n return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/small/'.$photoFingerprint.'.'.$extension;\n break;\n case 'large': // 500px x 500px\n return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/medium/'.$photoFingerprint.'.'.$extension;\n break;\n default:\n return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/tn/'.$photoFingerprint.'.'.$extension;\n break;\n }\n }\n }\n }\n\n switch ($size) {\n case 'small': // 50px x 50px\n return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=50&d=mm';\n break;\n case 'medium': // 200px x 200px\n return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=200&d=mm';\n break;\n case 'large': // 500px x 500px\n return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=500&d=mm';\n break;\n default:\n return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=50&d=mm';\n break;\n }\n }", "public function mainImageURL()\n {\n if ($this->image) {\n $imageLocation = $this->image->location;\n } else {\n // If the image cannot be displayed, show a generic image.\n $imageLocation = 'generic/generic1.jpg';\n }\n\n return Storage::url($imageLocation);\n }", "function cpo_image_url( $id, $size = 'full' ) {\n\t$url = '';\n\tif ( is_numeric( $id ) ) {\n\t\t$url = wp_get_attachment_image_src( $id, $size );\n\t\t$url = $url[0];\n\t} else {\n\t\t$url = $id;\n\t}\n\n\treturn $url;\n}", "private function get_image_size_links($post) {\r\n \t/* Set up an empty array for the links. */\r\n \t$links = array();\r\n \t/* Get the intermediate image sizes and add the full size to the array. */\r\n \t$sizes = get_intermediate_image_sizes();\r\n $sizes[] = 'full';\r\n\r\n \t/* Loop through each of the image sizes. */\r\n $i = 0;\r\n foreach ( $sizes as $size ) {\r\n /* Get the image source, width, height, and whether it's intermediate. */\r\n remove_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ) );\r\n if ($image = wp_get_attachment_image_src( $post->ID, $size )){\r\n\r\n $links[$i]['url'] = $image[0];\r\n $links[$i]['type'] = $size;\r\n $links[$i]['width'] = $image[1];\r\n $links[$i]['height'] = $image[2];\r\n\r\n $i++;\r\n }\r\n add_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ), 10, 3 );\r\n }\r\n\r\n return $links;\r\n }", "public function getPhotoLargeAttribute()\n {\n return Storage::url('large' . $this->photo_path);\n }", "public function buildPhotoUrl () {\n\t\t\n\t}", "public function getPhotoURL(){\r\n\t\t$photo = $this->getPhoto();\r\n\r\n\t\treturn $photo != null ? \"https://maps.googleapis.com/maps/api/place/photo?maxwidth=800&photoreference=\" . $photo . \"&key=\" . GOOGLE_MAPS_API_KEY_PRIVATE : null;\r\n\t}", "public function resolveThumbnailUrl();", "public function avatarUrl(): string\n {\n $sizes = ['xl', 'l', 'm', 's'];\n\n foreach ($sizes as $size) {\n if (array_key_exists($size, $this->avatarUrls())) {\n return $this->avatarUrls()[$size];\n }\n }\n\n // Could not find any of the sizes specified, just return the first one in the array.\n return current($this->avatarUrls());\n }", "public function avatarUrl(): string\n {\n $sizes = ['xl', 'l', 'm', 's'];\n\n foreach ($sizes as $size) {\n if (array_key_exists($size, $this->avatarUrls())) {\n return $this->avatarUrls()[$size];\n }\n }\n\n // Could not find any of the sizes specified, just return the first one in the array.\n return current($this->avatarUrls());\n }", "public function getPhotoUrl()\n {\n if (filter_var($this->photoUrl, FILTER_VALIDATE_URL)) {\n return $this->photoUrl;\n }\n\n if (null !== $this->photoUrl) {\n return \"/uploads/photos/$this->photoUrl\";\n }\n }", "function photonfill_get_url_image( $img_url, $img_size, $attr = array() ) {\n\treturn Photonfill()->get_url_image( $img_url, $img_size, $attr );\n}", "public function getUri($size){\n\t\tif($size=='full'){\n\t\t\treturn $this->getFileUri();\n\t\t}else {\n\t\t\tif(array_key_exists($size,Config::get('image.sizes'))){\n\t\t\t\t$parts = explode('.',$this->value);\n\t\t\t\tarray_pop($parts);\n\t\t\t\treturn static::getMediaUri() . '/' . implode('.',$parts) . '_' . $size . '.' . $this->getExtension();\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function getPhotoUrl()\n\t{\n\t\treturn $this->photo_url;\n\t}", "public function getImageUrl();", "function dahz_get_image_size_links() {\n\n\t/* If not viewing an image attachment page, return. */\n\tif ( !wp_attachment_is_image( get_the_ID() ) )\n\t\treturn;\n\n\t/* Set up an empty array for the links. */\n\t$links = array();\n\n\t/* Get the intermediate image sizes and add the full size to the array. */\n\t$sizes = get_intermediate_image_sizes();\n\t$sizes[] = 'full';\n\n\t/* Loop through each of the image sizes. */\n\tforeach ( $sizes as $size ) {\n\n\t\t/* Get the image source, width, height, and whether it's intermediate. */\n\t\t$image = wp_get_attachment_image_src( get_the_ID(), $size );\n\n\t\t/* Add the link to the array if there's an image and if $is_intermediate (4th array value) is true or full size. */\n\t\tif ( !empty( $image ) && ( true === $image[3] || 'full' == $size ) ) {\n\n\t\t\t/* Translators: Media dimensions - 1 is width and 2 is height. */\n\t\t\t$label = sprintf( __( '%1$s &#215; %2$s', 'dahz-core' ), number_format_i18n( absint( $image[1] ) ), number_format_i18n( absint( $image[2] ) ) );\n\n\t\t\t$links[] = sprintf( '<a class=\"image-size-link\">%s</a>', $label );\n\t\t}\n\t}\n\n\t/* Join the links in a string and return. */\n\treturn join( ' <span class=\"sep\">/</span> ', $links );\n}", "public function getMediaImageUrl() {\n return $this->objectManager->get ( 'Magento\\Store\\Model\\StoreManagerInterface' )->getStore ()->getBaseUrl ( \\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA ) . 'catalog/product';\n }", "public function getResponsiveImagesDirectoryUrl(): string\n {\n return $this->config->get(\"filesystems.disks.{$this->media->disk}.url\").'/'\n .$this->pathGenerator->getPathForResponsiveImages($this->media);\n }", "public function get_image_url()\n {\n }", "public function getPhotoUrlAttribute()\n {\n return data_get($this, 'photo.s3url', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/parcels/medium.png');\n }", "public function getPictureUrl()\n {\n return $this->getImageurl();\n }", "public function getPhoto($userId, $size);", "public function get_image_link()\n {\n }", "public function getImage(){\n $images = $this->getImageUrls($this->image_size);\n return Utils::saveImage($images->attr('data-url'));\n }", "protected function _getUrl(): string\n {\n property_exists_or_fail($this, ['id', 'album']);\n\n return Router::url(['_name' => 'photo', 'slug' => $this->get('album')->get('slug'), 'id' => (string)$this->get('id')], true);\n }", "public function getImageUrl2($size = '50x50', $options = array())\n {\n $attrname = $this->name;\n $params = array();\n $params['id'] = $this->id;\n if (!empty($attrname)) {\n if ($size !== false) {\n $params['size'] = $size;\n //if (isset($options['mod'])) {\n // $params['mod'] = $options['mod'];\n //}\n return Yii::app()->createUrl('/core/attachment', $params);\n\n //return CMS::assetImage($size, $attrname, 'attachments.' . $dir, 'attachments/' . $redir, $options);\n }\n } else {\n return false;\n }\n }" ]
[ "0.6900975", "0.6864399", "0.6854328", "0.6821344", "0.6792378", "0.6719705", "0.6677021", "0.66701275", "0.6655638", "0.6609071", "0.6567192", "0.6550256", "0.6543554", "0.6543554", "0.6515873", "0.65151435", "0.65028185", "0.6491071", "0.64888716", "0.64698875", "0.6420726", "0.64103055", "0.640164", "0.63546324", "0.6318138", "0.63179016", "0.62696934", "0.62683904", "0.62593436", "0.62553495" ]
0.687726
1
Build direct photo url without flickr API calls
public function buildPhotoUrl () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublicUrl() {\n\t\treturn \"http://flickr.com/photos/{$this->getUserId()}/{$this->getId()}/\";\n\t}", "public function getPhotoURL(){\r\n\t\t$photo = $this->getPhoto();\r\n\r\n\t\treturn $photo != null ? \"https://maps.googleapis.com/maps/api/place/photo?maxwidth=800&photoreference=\" . $photo . \"&key=\" . GOOGLE_MAPS_API_KEY_PRIVATE : null;\r\n\t}", "protected function _getUrl(): string\n {\n property_exists_or_fail($this, ['id', 'album']);\n\n return Router::url(['_name' => 'photo', 'slug' => $this->get('album')->get('slug'), 'id' => (string)$this->get('id')], true);\n }", "public function toUrl()\n {\n $queryParams = '';\n\n $index = 0;\n\n foreach ($this->args as $key => $param) {\n $separator = '?';\n\n if ($index) {\n $separator = '&';\n }\n\n $queryParams .= \"{$separator}{$key}={$param}\";\n\n $index++;\n }\n\n return \"https://dev-ops.mee.ma/glenn/1/5/people.jpg{$queryParams}\";\n }", "public static function generatePhotoApiUrl($photo, $sizeType = '') {\n $farmId = $photo->farm;\n $serverId = $photo->server;\n $photoId = $photo->id;\n $secretId = $photo->secret;\n\n if ($sizeType != 'o') {\n return \"https://farm\" . $farmId . \".staticflickr.com/\" . $serverId . \"/\" . $photoId . \"_\" . $secretId . \"_\". $sizeType .\".jpg\";\n }\n\n return \"https://farm\" . $farmId . \".staticflickr.com/\" . $serverId . \"/\" . $photoId . \"_\" . $secretId . \".jpg\";\n }", "public function getPhotoUrl()\n {\n if (filter_var($this->photoUrl, FILTER_VALIDATE_URL)) {\n return $this->photoUrl;\n }\n\n if (null !== $this->photoUrl) {\n return \"/uploads/photos/$this->photoUrl\";\n }\n }", "public function getDirectUrl(): string\n {\n return $this->directUrlBase . $this->templateId . '.png?' . http_build_query($this->buildQuery());\n }", "public function getPhotoUrl()\n\t{\n if ($about = $this->getAbout()) {\n \t$ci =& get_instance();\n $ci->load->config('dir');\n $upload_path = $ci->config->item('upload_dir');\n\n\t\t\t$path = $upload_path . 'media/' . $about->photo; \n\n if (!file_exists($path) || $about->photo == '') {\n $url = base_url().BASE_IMG . 'user-photo.jpg';\n } else {\n $url = site_url($path);\n }\n }\t\n\n return $url;\t\n\t}", "public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}", "public function get_member_photo_url($member)\n {\n return '';\n }", "public function getUrl()\n {\n return $this->api\n . '?method='\n . $this->getMethod()\n . '&api_key='\n . $this->getApiKey()\n . '&tags='\n . $this->getTag()\n . '&per_page='\n . $this->getPerPage()\n . '&page='\n . $this->getPage()\n . '&format='\n . $this->getFormat()\n . '&photo_id='\n . $this->getPhotoId()\n . '&nojsoncallback=1';\n }", "function build_pixel_url() {\n\t\tif ( $this->error ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$args = get_object_vars( $this );\n\n\t\t// Request Timestamp and URL Terminator must be added just before the HTTP request or not at all.\n\t\tunset( $args['_rt'] );\n\t\tunset( $args['_'] );\n\n\t\t$validated = self::validate_and_sanitize( $args );\n\n\t\tif ( is_wp_error( $validated ) )\n\t\t\treturn '';\n\n\t\treturn Jetpack_Tracks_Client::PIXEL . '?' . http_build_query( $validated );\n\t}", "public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}", "public function getPhotoUrl()\n\t{\n\t\treturn $this->photo_url;\n\t}", "public function mainImageURL()\n {\n if ($this->image) {\n $imageLocation = $this->image->location;\n } else {\n // If the image cannot be displayed, show a generic image.\n $imageLocation = 'generic/generic1.jpg';\n }\n\n return Storage::url($imageLocation);\n }", "function photo_localurl($thumb=true){\n if ($thumb) $ext = \"\"; else $ext = \"_big\";\n if (!is_dir($this->photodir)) {\n $this->debug_scalar(\"<BR>***ERROR*** The configured image directory does not exist!<BR>\");\n return false;\n }\n $path = $this->photodir.\"nm\".$this->imdbid().\"${ext}.jpg\";\n if ( @fopen($path,\"r\")) return $this->photoroot.\"nm\".$this->imdbid().\"${ext}.jpg\";\n if (!is_writable($this->photodir)) {\n $this->debug_scalar(\"<BR>***ERROR*** The configured image directory lacks write permission!<BR>\");\n return false;\n }\n if ($this->savephoto($path,$thumb)) return $this->photoroot.\"nm\".$this->imdbid().\"${ext}.jpg\";\n return false;\n }", "public function picture_url() {\n return $this->_adaptee->user_photo(\"\", true);\n }", "function buildAuthUrl($frob ='', $key = '', $secret = '', $perms = 'delete') {\n\t\t$params = array();\n if ($frob != '') {\n $params['frob'] = $frob;\n }\n\t\tif ($key == '') {\n\t\t\t$key = $this->modx->getOption('xflickr.api_key');\n\t\t}\n\t\tif ($secret == '') {\n\t\t\t$secret = $this->modx->getOption('xflickr.api_secret');\n\t\t}\n\t\t$params['api_key'] = $key;\n\t\t$params['perms'] = $perms;\n //return 'http://flickr.com/services/auth/?'.$this->signParams($params);\n $signing = '';\n $values = array();\n ksort($params);\n foreach($params as $key => $value) {\n\t\t\t$signing .= $key . $value;\n\t\t\t$values[] = $key . '=' . urlencode($value);\n }\n $values[] = 'api_sig=' . md5($secret . $signing);\n return 'http://flickr.com/services/auth/?'.implode('&', $values);\n }", "public function getFeed()\n\t{ \n // Set a default feed.\n $feed = 'http://api.flickr.com/services/feeds/photos_public.gne'; \n \n switch ($this->get('params')->get('source'))\n {\n case 'recent_photos':\n $feed = 'http://api.flickr.com/services/feeds/photos_public.gne';\n break;\n case 'user_photos':\n if ($this->get('params')->get('flickruser')) return 'http://api.flickr.com/services/feeds/photos_public.gne?id='.$this->nameToId($this->get('params')->get('flickruser'));\n break; \n case 'group_photos':\n if ($this->get('params')->get('flickrgroup')) return 'http://api.flickr.com/services/feeds/groups_pool.gne?id='.$this->nameToId($this->get('params')->get('flickrgroup'));\n break; \n case 'friends_photos':\n if ($this->get('params')->get('flickruser')) return 'http://api.flickr.com/services/feeds/photos_friends.gne?user_id='.$this->nameToId($this->get('params')->get('flickruser'));\n break; \n case 'keyword_photos':\n if ($this->get('params')->get('keywords')) return 'http://api.flickr.com/services/feeds/photos_public.gne?tags='.$this->get('params')->get('keywords');\n break;\n case 'set_photos':\n if ($this->get('params')->get('flickrset')) return 'http://api.flickr.com/services/feeds/photoset.gne?set='.$this->get('params')->get('flickrset').'&nsid='.$this->nameToId($this->get('params')->get('flickruser'));\n break; \n }\n \n return $feed;\n\t}", "public function getPhotoUrlAttribute()\n {\n return asset(env('FRONTEND_IMAGES_PATH') . $this->image);\n }", "public function build_pixel_url() {\n\t\tif ( $this->error ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$args = get_object_vars( $this );\n\n\t\t// Request Timestamp and URL Terminator must be added just before the HTTP request or not at all.\n\t\tunset( $args['_rt'], $args['_'] );\n\n\t\t$validated = self::validate_and_sanitize( $args );\n\n\t\tif ( is_wp_error( $validated ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn esc_url_raw( WC_Tracks_Client::PIXEL . '?' . http_build_query( $validated ) );\n\t}", "public function getPhotoLinkAttribute()\n {\n return $this->attributes['photo_link'] = ($this->photo)?Storage::disk('public')->url($this->photo):config('values.noPhoto');\n }", "public function buildFrontendUri() {}", "function _adRenderBuildImageUrlPrefix()\n{\n $conf = $GLOBALS['_MAX']['CONF'];\n return $GLOBALS['_MAX']['SSL_REQUEST'] ? 'https://' . $conf['webpath']['imagesSSL'] : 'http://' . $conf['webpath']['images'];\n}", "function cpo_image_url( $id, $size = 'full' ) {\n\t$url = '';\n\tif ( is_numeric( $id ) ) {\n\t\t$url = wp_get_attachment_image_src( $id, $size );\n\t\t$url = $url[0];\n\t} else {\n\t\t$url = $id;\n\t}\n\n\treturn $url;\n}", "public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path && $this->photoExists()\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->filamentDefaultAvatar();\n }", "public function getThumbnailUrl();", "function constructURL($object);", "public function resolveThumbnailUrl();", "public function getPictureUrl()\n\t{\n\t\treturn 'http://local.postcard.com' . $this->getPictureUri();\n\t}" ]
[ "0.7149396", "0.6715539", "0.6649939", "0.6552892", "0.6546769", "0.6533244", "0.6471729", "0.6382621", "0.63429135", "0.61817056", "0.615139", "0.6149372", "0.61065555", "0.6072044", "0.59625787", "0.59556365", "0.588957", "0.58646643", "0.5818456", "0.5807909", "0.58042216", "0.57794523", "0.577118", "0.57632667", "0.5755448", "0.57500035", "0.57442373", "0.5721909", "0.5715467", "0.5714762" ]
0.76183903
0
return array van alle regels van BestelID
public static function getBestellingRegelsFromId($BestelID) { $sql = "SELECT * FROM bestelregel WHERE BestelID='".$BestelID."'"; $dbh = new PDO(DBConfig::$DB_CONNSTRING, DBConfig::$DB_USERNAME, DBConfig::$DB_PASSWORD); $result = $dbh->query($sql); $arrBestelregel = array(); foreach ($result as $rij) { $bestelregel = new Bestelregel($rij["ProductID"], $rij["Aantal"]); array_push($arrBestelregel, $bestelregel); } $dbh = null; if (isset($arrBestelregel)) { return $arrBestelregel; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function alleBestellungen(){\n\n\t\treturn array(\n\t\t\t[\"ID\" => 1, \"Vorname\" => \"Wenke\", \"Nachname\" => \"Tautz\"],\n\t\t\t[\"ID\" => 2, \"Vorname\" => \"Christoph\", \"Nachname\" => \"Silge\"],\n\t\t\t[\"ID\" => 3, \"Vorname\" => \"Henry\", \"Nachname\" => \"Juwig\"],\n\t\t\t[\"ID\" => 4, \"Vorname\" => \"Felix\", \"Nachname\" => \"Klotzsche\"]\n\t\t);\n\t}", "function get_all_bereiche_ids_of_konvertierung($konvertierung_id) {\n\t\t# requests xp_bereich to work for all schemata\n\t\t$sql = \"\n\t\t\tSELECT \n\t\t\t\tgml_id\n\t\t\tFROM\n\t\t\t\txplan_gml.xp_bereich\n\t\t\tWHERE\n\t\t\t\tkonvertierung_id = \" . $konvertierung_id . \";\n\t\t\t\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$bereiche = pg_fetch_all_columns($ret[1]);\n\t\treturn $bereiche;\n\t}", "public function getLesIdFrais(){\r\n\t\t$req = \"select fraisforfait.id as idfrais from fraisforfait order by fraisforfait.id\";\r\n\t\t$res = PdoGsb::$monPdo->query($req);\r\n\t\t$lesLignes = $res->fetchAll();\r\n\t\treturn $lesLignes;\r\n\t}", "public function getAllID()\n {\n $queryBuilder = $this->db->createQueryBuilder();\n $queryBuilder\n ->select('u.id')\n ->from('gamers', 'u');\n $statement = $queryBuilder->execute();\n $gamersID = $statement->fetchAll();\n foreach ($gamersID as $gamerID) {\n var_dump($gamerID);\n }\n return $gamersID; \n }", "public function getAlleOogkleuren(){\n\n $sql = \"SELECT *\n FROM oogkleuren order by oogkleur asc\";\n $dbh = new PDO(DBCONFIG::$DB_CONNSTRING, DBCONFIG::$DB_USERNAME, DBCONFIG::$DB_PASSWORD);\n $resultSet = $dbh->query($sql);\n $lijst = array();\n foreach ($resultSet as $rij){\n $oogkleur=Oogkleur::create($rij['oogkleurId'],$rij[\"oogkleur\"]);\n array_push($lijst,$oogkleur);\n }\n $dbh=null;\n return $lijst;\n }", "public function eventisegnalati(){\r\n $query = \"SELECT DISTINCT idev FROM segnalazione \";\r\n\t\t$result = self::$conn->query($query);\r\n $id = array();\r\n if($result){\r\n while($row = $result->fetch_assoc()){\r\n $id[] = $row['idev']; \r\n }\r\n }\r\n return $id;\r\n }", "public function getLesIdFrais()\n {\n $requetePrepare = PdoGsb::$monPdo->prepare(//Cette requête classe les idFrais par id\n 'SELECT fraisforfait.id as idfrais '\n . 'FROM fraisforfait ORDER BY fraisforfait.id'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n }", "public function fellows() {\n\t\t$list = array();\n\t\t$db = Db::getInstance();\n\t\t$req = $db->prepare('SELECT IdSeguace FROM Seguaci WHERE IdUtente = :id');\n\t\t$req->execute(array('id' => $this->id()));\n\t\tforeach ($req->fetchAll() as $result) {\n\t\t\t$list[] = $result['IdSeguace'];\n\t\t}\n\t\treturn $list;\n\t}", "public function getVilles()\n {\n $arrVillesSelectionnees = [];\n if (count($this->villes) > 0) {\n //dd($this->villes);\n foreach ($this->villes as $ville) {\n array_push($arrVillesSelectionnees, $ville->id);\n }\n\n return json_encode($arrVillesSelectionnees);\n } else {\n return json_encode([]);\n }\n }", "function getBkRms($ID){\r\n $inx = 0;\r\n $arrpack = array();\r\n $conn = getConnection();\r\n\r\n $stmt = $conn->prepare(\"SELECT rooms_idrooms FROM rms_reservd where reservations_idreservations = ?\");\r\n $stmt->bind_param(\"i\", $ID);\r\n \r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n\r\n if($result->num_rows > 0){\r\n while($row = $result->fetch_assoc()){\r\n $arrpack[$inx] = $row['rooms_idrooms'];\r\n $inx++;\r\n }\r\n }\r\n $conn->close(); \r\n\r\n return $arrpack;\r\n }", "public function getLesIdFrais()\n {\n $requetePrepare = PdoGsb::$monPdo->prepare(\n 'SELECT fraisforfait.id as idfrais '\n . 'FROM fraisforfait ORDER BY fraisforfait.id'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n }", "public function getLesIdFrais()\n {\n $requetePrepare = PdoGsb::$monPdo->prepare(\n 'SELECT fraisforfait.id as idfrais '\n . 'FROM fraisforfait ORDER BY fraisforfait.id'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n }", "public abstract function get_ids();", "function ordina_id(){\n $mysqli = connetti();\n $sql = \"SELECT * FROM spesa WHERE 1=1 ORDER BY id ASC\";\n $risultato_query = $mysqli->query($sql);\n $array_righe = [];\n while($righe_tabella = $risultato_query->fetch_array(MYSQLI_ASSOC)){\n $array_righe[] = $righe_tabella;\n }\n chiudi_connessione($mysqli);\n return $array_righe;\n}", "public function ultimoID()\n {\n $sentencia = \"SELECT id, clNumReporte FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n\n return $registros;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function getIds();", "public function getIds();", "public function getIds() {\n $sources = array();\n \n $sources[] = $this->id;\n \n foreach ($this->points as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->lines as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->polygons as &$g) {\n $sources[] = $g->id;\n }\n if ( !empty($this->address) ) {\n $sources[] = $this->address->id;\n }\n foreach ($this->relationships as &$r) {\n $sources[] = $r->id;\n }\n \n return array_filter($sources);\n }", "public function getIdValue()\n {\n $valores = array();\n \n foreach ($this->findBy(array(), array('nome' => 'ASC')) as $item) {\n $valores[$item->getId()] = $item->getNome();\n }\n\n return $valores;\n }", "function listeGroupes(){\n $groupes = array();\n $connexion = new Connexion();\n $query = 'SELECT * FROM GROUPE';\n $result = $connexion->query($query);\n foreach($result as $row){\n $groupes[] = array('id'=>$row['id'],'libelle'=>$row['libelle'],'nombre'=>$row['nombre']);\n }\n return $groupes;\n}", "public function getIds() {\n\t\treturn array_keys($this->registered);\n\t}", "function getObjectIDs() {\n\t\t$tmp = array();\n\t\tif ( $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$tmp[] = $oObject->getID();\n\t\t\t}\n\t\t}\n\t\treturn $tmp;\n\t}", "private function telaPerfilGerente()\r\n {\r\n //Carregando as lojas do banco de dados\r\n $repositorio = $this->getDoctrine()->getRepository('DCPBundle:Quebra');\r\n\r\n $sql = $repositorio->createQueryBuilder('l')\r\n ->select('l.id')\r\n ->groupby('l.id')\r\n ->getquery();\r\n\r\n $resultado = $sql->getResult();\r\n\r\n $loja = array();\r\n $contLoja = 0;\r\n foreach($resultado as $data)\r\n {\r\n if (!in_array($data, $loja))\r\n {\r\n $loja[$contLoja] = $data[\"id\"];\r\n $contLoja++;\r\n }\r\n }\r\n \r\n return $loja;\r\n }", "function getAllRitten($gebruikerId) {\n $this->db->where('gebruikerIdVrijwilliger', $gebruikerId);\n $query = $this->db->get('rit');\n return $query->result();\n }", "public function getEpisodeIds(){\n $result = array();\n $progam = null;\n $con = $this->mysqli->prepare(\n \"SELECT EpNum FROM episode where programName=? and callsign=?\");\n $con->bind_param('ss',$this->name,$this->callsign);\n $con->bind_result($progam);\n if($con->execute()){\n while($con->fetch()){\n array_push($result, $progam);\n }\n return $result;\n }\n else{return false;}\n }", "public static function getAllSchoolIds(){\n $schoolIds = array();\n $result = mysql_query(\"SELECT id FROM school\") or die(mysql_error());\n while($row = mysql_fetch_array($result)){\n array_push($schoolIds, $row['id']);\n }\n return $schoolIds;\n }", "function getChambreListId(){\n try {\n $sql = 'select id_chambre, numero_chambre from chambre_hospitalisation order by id_chambre desc';\n $resilt = $this->executeRequete($sql)->fetchAll();\n return $resilt;\n //var_dump($resilt);\n } catch (Exception $ex) {\n echo $ex->getMessage();\n }\n }", "public function getAllIds(): array;", "public function GetId()\n\t{\n\t\t$datas = $this->db->query('select DISTINCT id_komponenbiaya from masterkomponenbiaya order by id_komponenbiaya asc');\n\t\treturn $datas;\n\t}", "function ss_hammerOID_pollers_indexes() {\n\n $return_arr = array();\n\t\t\n\t$rows = db_fetch_assoc(\"SELECT id FROM poller\");\n\n\n for ($i=0;($i<sizeof($rows));$i++) {\n $return_arr[$i] = $rows[$i]['id'];\n }\n\n return $return_arr;\n}" ]
[ "0.65718067", "0.64814", "0.6462641", "0.6409762", "0.6257897", "0.6219593", "0.6206344", "0.6188429", "0.61761147", "0.6148916", "0.6142261", "0.6134887", "0.613374", "0.6104324", "0.60840917", "0.6064643", "0.6064643", "0.6048372", "0.6033722", "0.6021515", "0.601085", "0.6005723", "0.6002407", "0.59985274", "0.5986837", "0.59493744", "0.5919081", "0.59169936", "0.5910605", "0.5896194" ]
0.7542626
0
Cache key for dimensions for given container
protected function getDimensionCacheKey($hash, $variant = null) { return self::CACHE_DIMENSIONS . sha1($hash . '-' . $variant); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function calculateCacheKey()\n {\n if ($this->_cacheKey === null) {\n $key = [__CLASS__, Yii::$app->requestedRoute];\n if (is_array($this->variations)) {\n foreach ($this->variations as $value) {\n $key[] = $value;\n }\n }\n $this->_cacheKey = $key;\n }\n \n return $this->_cacheKey;\n }", "public function getCacheKey()\n {\n return $this->cacheKey;\n }", "public function getCacheKey()\n {\n return md5($this->formId . ':' . implode(',', $this->fieldIds));\n }", "private function getCacheKey($storage_name){\n return $storage_name.'_'.$this->media_type.'_'.$this->media_id;\n }", "public function getCacheKey() {\n return $this->_cacheKey;\n }", "public function getCacheKeyInfo();", "public function cacheKey(): string {\n return self::CACHE_PREFIX . $this->id\n . ($this->revisionId ? '_r' . $this->revisionId : '');\n }", "private function getCacheKey(): string\n {\n return $this->webserviceId.$this->cacheKey;\n }", "public function getKey($container, $key) {\n\t\treturn $this->_memcached->get('@@'.$container.'.'.$key);\n\t}", "public function cacheKey() {\n $params = $this->getParameters();\n $ret = '';\n $this->make_cache_key($params, $ret);\n\n return md5($ret);\n }", "protected function getCacheKey()\r\n {\r\n if (null == $this->cacheKey) {\r\n $this->cacheKey = get_class($this)\r\n . $this->getParent()->getEnvironment()\r\n . $this->getHttpHost();\r\n }\r\n return $this->cacheKey;\r\n }", "public function getCacheKey(Request $request): string;", "public function generateCacheKey() {\n $key = array(\n 'connection' => $this->connection->getName(),\n 'collection' => $this->collection->getName(),\n 'wheres' => $this->wheres,\n 'columns' => $this->columns,\n 'groups' => $this->groups,\n 'orders' => $this->orders,\n 'offset' => $this->offset,\n 'aggregate' => $this->aggregate,\n );\n\n return md5(serialize(array_values($key)));\n }", "public function getCacheKey()\n {\n return $this->CacheKey;\n }", "public function getCalculationsCacheKeyAttribute()\n {\n return 'shop_' . $this->table . '_' . $this->attributes['id'] . '_calculations';\n }", "protected function _getAdditionalCacheId()\n\t{\n\t\treturn md5('CONTAINER_ORDERS_' . $this->_placeholder->getAttribute('cache_id'));\n\t}", "function cache_key(Repository $repo) {\n return \"ms_\" . md5($repo->user . $repo->name);\n}", "public function getConfigCacheKey() \n {\n return (string) $this->configCacheKey;\n }", "public function getCacheKey(): string\n {\n $customerGroupId = 0;\n\n if ($this->hasCustomerGroupId()) {\n $customerGroupId = $this->getCustomerGroupId();\n }\n\n return sprintf('%d-%d-%d', $this->getWebsiteId(), $customerGroupId, $this->getStoreId());\n }", "protected function getCacheKey() {\n $plugin_id = hash('sha256', $this->getPluginId());\n $uri = $this->config('uri');\n\n return $plugin_id . ':' . $uri;\n }", "public function key ()\n {\n return $this->valid() ? $this->cache[ $this->offset ][ 0 ] : NULL;\n }", "private function getCacheKey(Client $client, string $resource, array $query): string\n {\n $params = array_merge_recursive(\n array(\n $client->getShop(),\n $resource,\n ),\n $query\n );\n //====================================================================//\n // Build Image Cache Key\n return implode(\n \".\",\n array(\n \"splash.shopify.connector.list\",\n md5(serialize($params)),\n )\n );\n }", "protected function calculateKey($id)\n\t{\n\t return self::CACHE_KEY_PREFIX.$id;\n\t}", "public function generateCacheKey()\n {\n $key = array(\n 'connection' => $this->connection->info()['name'],\n 'wheres' => $this->wheres,\n 'columns' => $this->columns,\n 'groups' => $this->groups,\n 'orders' => $this->orders,\n 'offset' => $this->offset,\n 'limit' => $this->limit,\n 'aggregate' => $this->aggregate,\n );\n\n return md5(serialize(array_values($key)));\n }", "function getCacheId() {\n return get_class($this).\"_\".$this->id;\n }", "public function getCacheId()\n {\n return md5(serialize($this->params));\n }", "public function getCacheKey()\n {\n return md5('SprainCurrencyConverter_' . $this->getName() . $this->baseCurrency . $this->targetCurrency);\n }", "protected function cacheKey() : string\n {\n return $this->cacheKey ?? $this->cacheKeyHash();\n }", "private function cacheKey()\n {\n return sprintf('contact-permissons-%s', $this->client->patientContactId);\n }", "protected function cacheKey()\n {\n return md5($this->gridField->Link());\n }" ]
[ "0.64946055", "0.618433", "0.6171773", "0.61240554", "0.6103964", "0.6052702", "0.6049449", "0.5994975", "0.594321", "0.58983666", "0.5892559", "0.5881405", "0.5847667", "0.58197445", "0.5740596", "0.570528", "0.5694504", "0.56800574", "0.56666285", "0.56533295", "0.5652369", "0.5638711", "0.5630889", "0.5624044", "0.5622689", "0.559791", "0.5595425", "0.5587886", "0.55769265", "0.55660963" ]
0.6314004
1
Warm dimension cache for the given asset
protected function warmCache($hash, $variant = null) { // Warm dimension cache $key = $this->getDimensionCacheKey($hash, $variant); $resource = $this->getImageResource(); if ($resource) { $result = $this->getResourceDimensions($resource); $this->getCache()->set($key, $result); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function buildSpriteDataAndCreateCacheEntry() {}", "public function getCache();", "protected function getCacheModule() {}", "private static function getAssetCache($asset)\n\t{\n\t\treturn new AssetCache\n\t\t(\t$asset\n\t\t,\tnew FilesystemCache(self::cachePath())\n\t\t);\n\t}", "protected function getMemoryCache() {}", "public function getCacheAdapter();", "function cacheThisImage($img)\n{\n\trequire_once 'externalLibraries/ImageCache.php';\n\t$baseurl=base_url();\n\t$imagecache = new ImageCache();\n\t//$imagecache->cached_image_directory = $baseurl. 'entreprenity/api/cachedImages/';\n\t$imagecache->cached_image_directory = dirname(__FILE__) . '/cachedImages';\n\n\t$cached_src_one = $imagecache->cache($img);\n\t//return $imagecache->cached_image_directory;\n\treturn $cached_src_one;\n\n}", "abstract protected function cacheData();", "public function getCachePathString()\n\t{\n\t\treturn \"rs-\".$this->_maxWidth.\"-\".$this->_maxHeight.\"-\".$this->_maintainAspectRatio.\"-\".$this->_scaleUp;\n\t}", "public static function getCache() {}", "protected function getRuntimeCache() {}", "function ag_create_wm_cache() {\n\trequire_once(AG_DIR .'/functions.php');\n\t\n\t// force PHP debug mode\n\tini_set('display_errors', 1);\n\tini_set('display_startup_errors', 1);\n\terror_reporting(E_ALL);\t\n\t\n\t\n\t// specific gallery or any gallery?\n\t$gid = (isset($_POST['gid'])) ? addslashes($_POST['gid']) : false;\n\t\n\tif(!$gid) {\n\t\t$args = array(\n\t\t\t'post_type' => 'ag_galleries',\n\t\t\t'numberposts' => -1,\n\t\t\t'post_status' => 'publish'\n\t\t);\n\t\t$galleries = get_posts($args);\n\t}\n\telse {\n\t\t$galleries = array( get_post($gid));\t\n\t}\n\t\n\t\n\t// perform\n\tforeach($galleries as $gallery) {\n\t\t$gid = $gallery->ID;\n\t\t$type = get_post_meta($gid, 'ag_type', true);\n\t\t$images = ag_gall_data_get($gid);\n\t\n\t\tif(is_array($images)) {\n\t\t\tforeach($images as $img) { \n\t\t\t\t$full_src = ag_img_src_on_type($img['img_src'], $type);\n\t\t\t\tag_watermark($full_src);\n\t\t\t}\n\t\t}\t\n\t}\n\n\tdie('success');\n}", "function build_image_size_rule($mod_name, $device=null) {\n\t\t\t$element = json_decode($this->get_cached_mod($mod_name),true);\n\t\t\t$element_props = '';\n\t\t\tif ($device && isset($element[$device])) {\n\t\t\t\t$element = $element[$device];\n\t\t\t}\n\t\t\t// if (isset($element->mode) && $element->mode == 'image') {\n\t\t\t\tif (!empty($element['imgwidth'])) {\n\t\t\t\t\t$element_props = \"\\twidth: {$element['imgwidth']}px;\";\n\t\t\t\t}\n\t\t\t\tif (!empty($element['imgheight'])) {\n\t\t\t\t\t$element_props .= \"\\n\\theight: {$element['imgheight']}px;\";\n\t\t\t\t}\n\t\t\t// }\n\t\t\treturn $element_props;\n\t\t}", "function asset($asset)\n{\n return ASSET_PREFIX . '/'. $asset;\n}", "public function get($cache_name);", "protected function getDimensions()\n {\n // Default result\n $result = [0, 0];\n\n // If we have a resource already loaded, this means we have modified the resource since the\n // original image was loaded. This means the \"Variant\" tuple key is out of date, and we don't\n // have a reliable cache key to load from, or save to. If we use the original tuple as a key,\n // we would run the risk of overwriting the original dimensions in the cache, with the values\n // of the resized instead.\n // Instead, we use the immediately available dimensions attached to this resource, and we will\n // rely on cache warming in writeToStore to save these values, where the \"Variant\" becomes available,\n // before the next time this variant is loaded into memory.\n $resource = $this->image;\n if ($resource) {\n return $this->getResourceDimensions($resource);\n }\n\n // Check if we have a container\n $container = $this->getAssetContainer();\n if (!$container) {\n return $result;\n }\n\n // Check cache for unloaded image\n $cache = $this->getCache();\n $key = $this->getDimensionCacheKey($container->getHash(), $container->getVariant());\n if ($cache->has($key)) {\n return $cache->get($key);\n }\n\n // Cache-miss\n $resource = $this->getImageResource();\n if ($resource) {\n $result = $this->getResourceDimensions($resource);\n $cache->set($key, $result);\n }\n return $result;\n }", "function load_theme_image_cache($db, $site, $true_theme, $true_lang)\n{\n global $THEME_IMAGES_CACHE, $THEME_IMAGES_SMART_CACHE_LOAD, $SMART_CACHE;\n\n if ($THEME_IMAGES_SMART_CACHE_LOAD == 0) {\n $THEME_IMAGES_CACHE[$site] = $SMART_CACHE->get('theme_images_' . $true_theme . '_' . $true_lang);\n if (is_null($THEME_IMAGES_CACHE[$site])) {\n $THEME_IMAGES_CACHE[$site] = array();\n }\n } elseif ($THEME_IMAGES_SMART_CACHE_LOAD == 1) {\n $test = $db->query_select('theme_images', array('id', 'path'), array('theme' => $true_theme, 'lang' => $true_lang));\n $THEME_IMAGES_CACHE[$site] = collapse_2d_complexity('id', 'path', $test);\n }\n\n $THEME_IMAGES_SMART_CACHE_LOAD++;\n}", "function get_cached_json($widget) {\n global $cachedb;\n\n if ( isset($cachedb) ) {\n $result=mysqli_query($cachedb, \"SELECT json FROM cache_table WHERE widget = '$widget'\");\n if ( $result ) {\n return mysqli_fetch_row($result)[0];\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "private function _cache($image, $remote){\n $this->cacheData = $this->cacheType == 'json' ? $this->_jsonCache() : $this->_apcCache();\n }", "function cache();", "protected function _create_cached()\n {\n if($this->url_params['c'])\n {\n // Resize to highest width or height with overflow on the larger side\n $this->image->resize($this->url_params['w'], $this->url_params['h'], Image::INVERSE);\n\n // Crop any overflow from the larger side\n $this->image->crop($this->url_params['w'], $this->url_params['h']);\n }\n else\n {\n // Just Resize\n $this->image->resize($this->url_params['w'], $this->url_params['h']);\n }\n\n // Apply any valid watermark params\n $watermarks = Arr::get($this->config, 'watermarks');\n if ( ! empty($watermarks))\n {\n foreach ($watermarks as $key => $watermark)\n {\n if (key_exists($key, $this->url_params))\n {\n $image = Image::factory($watermark['image']);\n $this->image->watermark($image, $watermark['offset_x'], $watermark['offset_y'], $watermark['opacity']);\n }\n }\n }\n\n // Save\n if($this->url_params['q'])\n {\n //Save image with quality param\n $this->image->save($this->cached_file, $this->url_params['q']);\n }\n else\n {\n //Save image with default quality\n $this->image->save($this->cached_file, Arr::get($this->config, 'quality', 80));\n }\n }", "function wp_using_ext_object_cache($using = \\null)\n {\n }", "function roots_embed_wrap($cache, $url, $attr = '', $post_ID = '') {\n return '<div class=\"entry-content-asset\">' . $cache . '</div>';\n}", "function &createCache() {}", "function fabric_embed_wrap($cache, $url, $attr = '', $post_ID = '') {\n return '<div class=\"entry-content-asset\">' . $cache . '</div>';\n}", "public function cache() {\r\n\t\t$this->resource->cache();\r\n\t}", "public function cacheFor(): DateTimeInterface|DateInterval|float|int|null;", "function cacheing_environment()\n\t{\n\t\t$info=array();\n\t\t$info['cache_on']='array(((array_key_exists(\\'root\\',$map)) && ($map[\\'root\\']!=\\'\\'))?intval($map[\\'root\\']):get_param_integer(\\'root\\',NULL),array_key_exists(\\'search\\',$map)?$map[\\'search\\']:\\'\\',array_key_exists(\\'sort\\',$map)?$map[\\'sort\\']:\\'\\',array_key_exists(\\'display_type\\',$map)?$map[\\'display_type\\']:NULL,array_key_exists(\\'template_set\\',$map)?$map[\\'template_set\\']:\\'\\',array_key_exists(\\'select\\',$map)?$map[\\'select\\']:\\'\\',array_key_exists(\\'param\\',$map)?$map[\\'param\\']:db_get_first_id(),get_param_integer(\\'max\\',array_key_exists(\\'max\\',$map)?intval($map[\\'max\\']):30),get_param_integer(\\'start\\',0))';\n\t\t$info['ttl']=60*2;\n\t\treturn $info;\n\t}", "public function cacheBin() {\n return 'cache_forsrights_webservice';\n }", "public function cache() {\n if(!array_key_exists($this->steamId64, self::$steamIds)) {\n self::$steamIds[$this->steamId64] = $this;\n if(!empty($this->customUrl) &&\n !array_key_exists($this->customUrl, self::$steamIds)) {\n self::$steamIds[$this->customUrl] = $this;\n }\n }\n }" ]
[ "0.5057346", "0.50521183", "0.49822682", "0.4969355", "0.4966165", "0.49424198", "0.4926269", "0.48793554", "0.4820696", "0.4813766", "0.48108497", "0.48038468", "0.48013285", "0.47988585", "0.47981292", "0.47946182", "0.47656912", "0.47438052", "0.4728983", "0.47258827", "0.47207615", "0.47160298", "0.47022295", "0.4700416", "0.46965504", "0.46799913", "0.46566153", "0.4655325", "0.4647925", "0.46315473" ]
0.54231393
0
Resize the image by preserving aspect ratio. By default, it will keep the image inside the maxWidth and maxHeight. Passing useAsMinimum will make the smaller dimension equal to the maximum corresponding dimension
public function resizeRatio($width, $height, $useAsMinimum = false) { return $this->createCloneWithResource( function (InterventionImage $resource) use ($width, $height, $useAsMinimum) { return $resource->resize( $width, $height, function (Constraint $constraint) use ($useAsMinimum) { $constraint->aspectRatio(); if (!$useAsMinimum) { $constraint->upsize(); } } ); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function resize()\n {\n $width = $this->width;\n $height = $this->height;\n $orig_width = imagesx($this->image);\n $orig_height = imagesy($this->image);\n \n // Determine new image dimensions\n if($this->mode === \"crop\"){ // Crop image\n \n $max_width = $crop_width = $width;\n $max_height = $crop_height = $height;\n \n $x_ratio = @($max_width / $orig_width);\n $y_ratio = @($max_height / $orig_height);\n \n if($orig_width > $orig_height){ // Original is wide\n $height = $max_height;\n $width = ceil($y_ratio * $orig_width);\n \n } elseif($orig_height > $orig_width){ // Original is tall\n $width = $max_width;\n $height = ceil($x_ratio * $orig_height);\n \n } else { // Original is square\n $this->mode = \"fit\";\n \n return $this->resize();\n }\n \n // Adjust if the crop width is less than the requested width to avoid black lines\n if($width < $crop_width){\n $width = $max_width;\n $height = ceil($x_ratio * $orig_height);\n }\n \n } elseif($this->mode === \"fit\"){ // Fits the image according to aspect ratio to within max height and width\n $max_width = $width;\n $max_height = $height;\n \n $x_ratio = @($max_width / $orig_width);\n $y_ratio = @($max_height / $orig_height);\n \n if( ($orig_width <= $max_width) && ($orig_height <= $max_height) ){ // Image is smaller than max height and width so don't resize\n $tn_width = $orig_width;\n $tn_height = $orig_height;\n \n } elseif(($x_ratio * $orig_height) < $max_height){ // Wider rather than taller\n $tn_height = ceil($x_ratio * $orig_height);\n $tn_width = $max_width;\n \n } else { // Taller rather than wider\n $tn_width = ceil($y_ratio * $orig_width);\n $tn_height = $max_height;\n }\n \n $width = $tn_width;\n $height = $tn_height;\n \n } elseif($this->mode === \"fit-x\"){ // Sets the width to the max width and the height according to aspect ratio (will stretch if too small)\n $height = @round($orig_height * $width / $orig_width);\n \n if($orig_height <= $height){ // Don't stretch if smaller\n $width = $orig_width;\n $height = $orig_height;\n }\n \n } elseif($this->mode === \"fit-y\"){ // Sets the height to the max height and the width according to aspect ratio (will stretch if too small)\n $width = @round($orig_width * $height / $orig_height);\n \n if($orig_width <= $width){ // Don't stretch if smaller\n $width = $orig_width;\n $height = $orig_height;\n }\n } else {\n throw new \\Exception('Invalid mode: ' . $this->mode);\n }\n \n\n // Resize\n $this->temp = imagecreatetruecolor($width, $height);\n \n // Preserve transparency if a png\n if($this->image_info['mime'] == 'image/png'){\n imagealphablending($this->temp, false);\n imagesavealpha($this->temp, true);\n }\n \n imagecopyresampled($this->temp, $this->image, 0, 0, 0, 0, $width, $height, $orig_width, $orig_height);\n $this->sync();\n \n \n // Cropping?\n if($this->mode === \"crop\"){ \n $orig_width = imagesx($this->image);\n $orig_height = imagesy($this->image);\n \n $x_mid = $orig_width/2; // horizontal middle\n $y_mid = $orig_height/2; // vertical middle\n \n $this->temp = imagecreatetruecolor($crop_width, $crop_height);\n \n // Preserve transparency if a png\n if($this->image_info['mime'] == 'image/png'){\n imagealphablending($this->temp, false);\n imagesavealpha($this->temp, true);\n }\n\n imagecopyresampled($this->temp, $this->image, 0, 0, ($x_mid-($crop_width/2)), ($y_mid-($crop_height/2)), $crop_width, $crop_height, $crop_width, $crop_height);\n $this->sync();\n }\n }", "function resize_image($src, $width, $height){\n // initializing\n $save_path = Wordless::theme_temp_path();\n $img_filename = Wordless::join_paths($save_path, md5($width . 'x' . $height . '_' . basename($src)) . '.jpg');\n\n // if file doesn't exists, create it\n if (!file_exists($img_filename)) {\n $to_scale = 0;\n $to_crop = 0;\n\n // Get orig dimensions\n list ($width_orig, $height_orig, $type_orig) = getimagesize($src);\n\n // get original image ... to improve!\n switch($type_orig){\n case IMAGETYPE_JPEG: $image = imagecreatefromjpeg($src);\n break;\n case IMAGETYPE_PNG: $image = imagecreatefrompng($src);\n break;\n case IMAGETYPE_GIF: $image = imagecreatefromgif($src);\n break;\n default:\n return;\n }\n\n // which is the new smallest?\n if ($width < $height)\n $min_dim = $width;\n else\n $min_dim = $height;\n\n // which is the orig smallest?\n if ($width_orig < $height_orig)\n $min_orig = $width_orig;\n else\n $min_orig = $height_orig;\n\n // image of the right size\n if ($height_orig == $height && $width_orig == $width) ; // nothing to do\n // if something smaller => scale\n else if ($width_orig < $width) {\n $to_scale = 1;\n $ratio = $width / $width_orig;\n }\n else if ($height_orig < $height) {\n $to_scale = 1;\n $ratio = $height / $height_orig;\n }\n // if both bigger => scale\n else if ($height_orig > $height && $width_orig > $width) {\n $to_scale = 1;\n $ratio_dest = $width / $height;\n $ratio_orig = $width_orig / $height_orig;\n if ($ratio_dest > $ratio_orig)\n $ratio = $width / $width_orig;\n else\n $ratio = $height / $height_orig;\n }\n // one equal one bigger\n else if ( ($width == $width_orig && $height_orig > $height) || ($height == $height_orig && $width_orig > $width) )\n $to_crop = 1;\n // some problem...\n else\n echo \"ALARM\";\n\n // we need to zoom to get the right size\n if ($to_scale == 1) {\n $new_width = $width_orig * $ratio;\n $new_height = $height_orig * $ratio;\n $image_scaled = imagecreatetruecolor($new_width, $new_height);\n // scaling!\n imagecopyresampled($image_scaled, $image, 0, 0, 0, 0, $new_width, $new_height, $width_orig, $height_orig);\n $image = $image_scaled;\n\n if($new_width > $width || $new_height > $height)\n $to_crop = 1;\n }\n else {\n $new_width = $width_orig;\n $new_height = $height_orig;\n }\n\n // we need to crop the image\n if ($to_crop == 1) {\n $image_cropped = imagecreatetruecolor($width, $height);\n\n // find margins for images\n $margin_x = ($new_width - $width) / 2;\n $margin_y = ($new_height - $height) / 2;\n\n // cropping!\n imagecopy($image_cropped, $image, 0, 0, $margin_x, $margin_y, $width, $height);\n $image = $image_cropped;\n }\n\n // Save image\n imagejpeg($image, $img_filename, 95);\n }\n\n // Return image URL\n return Wordless::join_paths(Wordless::theme_temp_path(), basename($img_filename));\n }", "public function setOriginalImageWidthHeight() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n /*\n * get original width and height\n */\n $this->__originalImageWidth = imagesx($this->__image);\n $this->__originalImageHeight = imagesy($this->__image);\n \n }\n \n }", "public function setOptimalImageWidthHeight() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n if (empty($this->__requestedHeight) || empty($this->__requestedWidth)) {\n $this->setError(__d('cloggy','Empty requested width and height.'));\n } else {\n\n /*\n * get optimal size width and height\n */\n switch ($this->__option) {\n\n case 'exact':\n $this->__optimalWidth = $this->__requestedWidth;\n $this->__optimalHeight = $this->__requestedHeight;\n break;\n\n case 'portrait':\n $this->__setOptimalSizeByPortrait();\n break;\n\n case 'landscape':\n $this->__setOptimalSizeByLandscape();\n break;\n\n case 'crop':\n $this->__setOptimalSizeByCrop();\n break;\n\n default:\n $this->__setOptimalSizeByAuto();\n break;\n }\n }\n \n }\n \n }", "public function resize($width = NULL, $height = NULL, $master = NULL)\n {\n if ($master === NULL)\n {\n // Choose the master dimension automatically\n $master = Image::AUTO;\n }\n // Image::WIDTH and Image::HEIGHT depricated. You can use it in old projects,\n // but in new you must pass empty value for non-master dimension\n elseif ($master == Image::WIDTH AND ! empty($width))\n {\n $master = Image::AUTO;\n\n // Set empty height for backvard compatibility\n $height = NULL;\n }\n elseif ($master == Image::HEIGHT AND ! empty($height))\n {\n $master = Image::AUTO;\n\n // Set empty width for backvard compatibility\n $width = NULL;\n }\n\n if (empty($width))\n {\n if ($master === Image::NONE)\n {\n // Use the current width\n $width = $this->width;\n }\n else\n {\n // If width not set, master will be height\n $master = Image::HEIGHT;\n }\n }\n\n if (empty($height))\n {\n if ($master === Image::NONE)\n {\n // Use the current height\n $height = $this->height;\n }\n else\n {\n // If height not set, master will be width\n $master = Image::WIDTH;\n }\n }\n\n switch ($master)\n {\n case Image::AUTO:\n // Choose direction with the greatest reduction ratio\n $master = ($this->width / $width) > ($this->height / $height) ? Image::WIDTH : Image::HEIGHT;\n break;\n case Image::INVERSE:\n // Choose direction with the minimum reduction ratio\n $master = ($this->width / $width) > ($this->height / $height) ? Image::HEIGHT : Image::WIDTH;\n break;\n }\n\n switch ($master)\n {\n case Image::WIDTH:\n // Recalculate the height based on the width proportions\n $height = $this->height * $width / $this->width;\n break;\n case Image::HEIGHT:\n // Recalculate the width based on the height proportions\n $width = $this->width * $height / $this->height;\n break;\n }\n\n // Convert the width and height to integers\n $width = round($width);\n $height = round($height);\n\n $this->_do_resize($width, $height);\n\n return $this;\n }", "public function resize_fit(IImageInformation $src, $width, $height);", "public function runMaxResize(Image $image, $width, $height) : Image\n\t{\n\t return $image->resize($width, $height, function ($constraint) {\n\t $constraint->aspectRatio();\n\t $constraint->upsize();\n\t });\n\t}", "public function resizeTo($width, $height, $resizeOption = 'default') {\n switch (strtolower($resizeOption)) {\n case 'exact':\n $this->resizeWidth = $width;\n $this->resizeHeight = $height;\n break;\n case 'maxwidth':\n $this->resizeWidth = $width;\n $this->resizeHeight = $this->resizeHeightByWidth($width);\n break;\n case 'maxheight':\n $this->resizeWidth = $this->resizeWidthByHeight($height);\n $this->resizeHeight = $height;\n break;\n case 'proportionally':\n $ratio_orig = $this->origWidth / $this->origHeight;\n $this->resizeWidth = $width;\n $this->resizeHeight = $height;\n if ($width / $height > $ratio_orig)\n $this->resizeWidth = $height * $ratio_orig;\n else\n $this->resizeHeight = $width / $ratio_orig;\n break;\n default:\n if ($this->origWidth > $width || $this->origHeight > $height) {\n if ($this->origWidth > $this->origHeight) {\n $this->resizeHeight = $this->resizeHeightByWidth($width);\n $this->resizeWidth = $width;\n } else if ($this->origWidth < $this->origHeight) {\n $this->resizeWidth = $this->resizeWidthByHeight($height);\n $this->resizeHeight = $height;\n } else {\n $this->resizeWidth = $width;\n $this->resizeHeight = $height;\n }\n } else {\n $this->resizeWidth = $width;\n $this->resizeHeight = $height;\n }\n break;\n }\n\n $this->newImage = imagecreatetruecolor($this->resizeWidth, $this->resizeHeight);\n if ($this->ext == \"image/gif\" || $this->ext == \"image/png\") {\n imagealphablending($this->newImage, false);\n imagesavealpha($this->newImage, true);\n $transparent = imagecolorallocatealpha($this->newImage, 255, 255, 255, 127);\n imagefilledrectangle($this->newImage, 0, 0, $this->resizeWidth, $this->resizeHeight, $transparent);\n }\n imagecopyresampled($this->newImage, $this->image, 0, 0, 0, 0, $this->resizeWidth, $this->resizeHeight, $this->origWidth, $this->origHeight);\n }", "function image_scale($src_abspath, $dest_abspath, $aspect, $width, $strategy)\n{\n $im = new \\Imagick($src_abspath);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_write($im, $dest_abspath);\n}", "private function __setOptimalSizeByCrop() {\n \n $heightRatio = $this->__originalImageHeight / $this->__requestedHeight;\n $widthRatio = $this->__originalImageWidth / $this->__requestedWidth;\n \n if ($heightRatio < $widthRatio) {\n $optimalRatio = $heightRatio;\n } else {\n $optimalRatio = $widthRatio;\n }\n \n $this->__optimalHeight = $this->__originalImageHeight / $optimalRatio;\n $this->__optimalWidth = $this->__originalImageWidth / $optimalRatio;\n \n }", "function imageResize($imageResourceId=null,$width=null,$height=null, $targetWidth=null, $targetHeight=null) {\n\n// $targetWidth =300;\n// $targetHeight =260;\n// dd($imageResourceId,$width,$height, $targetWidth, $targetHeight);\n\n $targetLayer=imagecreatetruecolor($targetWidth,$targetHeight);\n imagecopyresampled($targetLayer,$imageResourceId,0,0,0,0,$targetWidth,$targetHeight, $width,$height );\n// imagecopyresized($targetLayer,$imageResourceId,0,0,0,0, $width,$height,$targetWidth,$targetHeight);\n\n return $targetLayer;\n }", "public function resize($newWidth, $newHeight, $option='auto')\n\t{\n\t\t// Reset\n\t\tif ($this->imageResized) {\n\t\t\timagedestroy($this->imageResized);\n\t\t}\n\t\t$this->saveState = false;\n\n\t\t// Get optimal width and height based on $option\n\t\t$optionArray = $this->getDimensions((int)$newWidth, (int)$newHeight, $option);\n\t\t$this->optimalWidth = round($optionArray['optimalWidth']);\n\t\t$this->optimalHeight = round($optionArray['optimalHeight']);\n\n\t\t// Resample - create image canvas of x, y size\n\t\t$this->imageResized = imagecreatetruecolor($this->optimalWidth, $this->optimalHeight);\n\t\tif (imagetypes() & IMG_PNG) {\n\t\t\timagesavealpha($this->imageResized, true);\n\t\t\timagealphablending($this->imageResized, false);\n\t\t}\n\t\timagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $this->optimalWidth, $this->optimalHeight, $this->width, $this->height);\n\n\t\t// If option is 'crop', then crop too\n\t\tif ($option == 'crop') {\n\t\t\t$this->cropImage($this->optimalWidth, $this->optimalHeight, $newWidth, $newHeight);\n\t\t}\n\n\t\treturn $this;\n\t}", "public function resize($width)\n {\n // Validation\n if ($width > $this->_maxWidth)\n {\n throw new PHPMapper_Exception_Image(\n 'Image width too large. Maximum width for map is ' . $this->_maxWidth . ' pixels.'\n );\n }\n else if ($width < PHPMapper::MIN_WIDTH)\n {\n throw new PHPMapper_Exception_Image(\n 'Image width should be at least ' . PHPMapper::MIN_WIDTH . ' pixels wide.'\n );\n }\n\n // Resize the image while maintaining ratio\n $ratio = $this->_maxHeight / $this->_maxWidth;\n $height = floor($width * $ratio);\n $out = imagecreate($width, $height);\n\n imagealphablending($out, false);\n imagesavealpha($out, false);\n imagecopyresampled($out, $this->_image, 0, 0, 0, 0, $width, $height,\n $this->_maxWidth, $this->_maxHeight\n );\n\n imagedestroy($this->_image);\n $this->_image = $out;\n\n return $this;\n }", "public function resize(IImageInformation $src, $width, $height);", "public function resizeImage($imagePath, $maxWidth = '*', $maxHeight = '*', $allowScaleUp = false)\n {\n $imageSize = getimagesize($imagePath);\n\n // Check if the file exists and is an image\n if ($imageSize) {\n $oldWidth = $imageSize[0];\n $oldHeight = $imageSize[1];\n\n // Check if resize is needed\n if (($oldWidth > $maxWidth && '*' != $maxWidth)\n || ($oldHeight > $maxHeight && '*' != $maxHeight)\n || true === $allowScaleUp\n ) {\n if ($maxWidth && '*' == $maxHeight) {\n // Constrain by width\n $proportion = $oldHeight / $oldWidth;\n $width = $maxWidth;\n $height = $maxWidth * $proportion;\n } else if ($maxHeight && '*' == $maxWidth) {\n // Constrain by height\n $proportion = $oldWidth / $oldHeight;\n $height = $maxHeight;\n $width = $maxHeight * $proportion;\n } else if (!$maxWidth && $maxHeight) {\n // Constrain by smallest side\n if ($oldWidth > $oldHeight) {\n return $this->resizeImage($imagePath, '*', $maxHeight, $allowScaleUp);\n } else {\n return $this->resizeImage($imagePath, $maxWidth, '*', $allowScaleUp);\n }\n } else if ($maxWidth && !$maxHeight) {\n // Constrain by largest side\n if ($oldWidth > $oldHeight) {\n return $this->resizeImage($imagePath, $maxWidth, '*', $allowScaleUp);\n } else {\n return $this->resizeImage($imagePath, '*', $maxHeight, $allowScaleUp);\n }\n } else {\n if ($maxWidth > $maxHeight) {\n // Constrain by height\n return $this->resizeImage($imagePath, '*', $maxHeight, $allowScaleUp);\n } else {\n // Constrain by width\n return $this->resizeImage($imagePath, $maxWidth, '*', $allowScaleUp);\n }\n }\n } else {\n $width = $oldWidth;\n $height = $oldHeight;\n }\n\n $width = round($width);\n $height = round($height);\n\n return array('width' => $width, 'height' => $height);\n } else {\n return false;\n }\n }", "public static function ScaleThumbnailSizes($image, $maxwidth = -1, $maxheight = -1,\n $behaviour = 1, $upscale = false)\n {\n if(empty($image) ||\n (is_string($image) && !is_file($image)) ||\n !is_resource($image) )\n return false;\n\n if(is_string($image))\n {\n list($width, $height) = @getimagesize($image);\n $maxwidth = intval($maxwidth);\n $maxheight = intval($maxheight);\n }\n else\n {\n $maxwidth = $width = imagesx($image);\n $maxheight = $height = imagesy($image);\n }\n $maxwidth = Is_Valid_Number($maxwidth,0,1,SD_MEDIA_MAX_DIM);\n $maxheight = Is_Valid_Number($maxheight,0,1,SD_MEDIA_MAX_DIM);\n\n if(empty($maxwidth) || empty($maxheight))\n {\n return false;\n }\n\n //Calculate the width:height ratio\n $owidth = $width;\n $oheight = $height;\n $ratio = $height/$width;\n if($maxheight < 0 || $maxwidth < 0)\n {\n if($maxheight < 0 && $maxwidth < 0)\n {\n //Do nothing\n }\n elseif ($maxheight < 0)\n {\n $width = $maxwidth;\n $height = round($width*$ratio);\n }\n elseif ($maxwidth < 0)\n {\n $height = $maxheight;\n $width = round($height/$ratio);\n }\n }\n elseif ($ratio == 1)\n {\n //Same Height/Width\n if ($maxheight === $maxwidth)\n {\n $width = $maxwidth;\n $height = $maxheight;\n }\n else\n {\n $height = min($maxheight,$maxwidth);\n $width = min($maxheight,$maxwidth);\n }\n }\n else\n {\n $case1_width = $maxwidth;\n $case1_height = round($case1_width*$ratio);\n $case1_area = round($case1_width*$case1_height);\n\n $case2_height = $maxheight;\n $case2_width = round($case2_height/$ratio);\n $case2_area = round($case2_width*$case2_height);\n\n //Check if it is an ambiguous case\n if(($case1_width <= $maxwidth) && ($case1_height <= $maxheight) &&\n ($case2_width <= $maxwidth) && ($case2_height <= $maxheight))\n {\n //$behaviour Sometimes, 2 values are obtained. Set this to 1 to return the\n //one with the bigger pixel area or 2 to return the one with smaller pixel area.\n if($behaviour == 1)\n {\n if($case1_area >= $case2_area)\n {\n $height = $case1_height;\n $width = $case1_width;\n }\n else\n {\n $height = $case2_height;\n $width = $case2_width;\n }\n }\n else\n {\n if($case1_area <= $case2_area)\n {\n $height = $case1_height;\n $width = $case1_width;\n }\n else\n {\n $height = $case2_height;\n $width = $case2_width;\n }\n }\n }\n else\n {\n if ($case1_width <= $maxwidth && $case1_height <= $maxheight)\n {\n $height = $case1_height;\n $width = $case1_width;\n }\n else\n {\n $height = $case2_height;\n $width = $case2_width;\n }\n }\n }\n\n if(($height > $oheight) || ($width > $owidth))\n {\n $width = $owidth;\n $height = $oheight;\n }\n $array = array((int)$width,(int)$height);\n return $array;\n\n }", "public function _set_new_size_auto()\n {\n if (empty($this->source_width) || empty($this->source_height)) {\n if ( ! $this->SILENT_MODE) {\n trigger_error('Missing source image sizes!', E_USER_WARNING);\n }\n return false;\n }\n $k1 = $this->source_width / $this->limit_x;\n $k2 = $this->source_height / $this->limit_y;\n $k = $k1 >= $k2 ? $k1 : $k2;\n if ($this->reduce_only && $k1 <= 1 && $k2 <= 1) {\n $this->output_width = $this->source_width;\n $this->output_height = $this->source_height;\n } else {\n $this->output_width = round($this->source_width / $k, 0);\n $this->output_height = round($this->source_height / $k, 0);\n }\n return true;\n }", "public function thumbnail($image_path, $size_name, $maxWidth = 370, $maxHeight = 370)\n\t{\n\t\t$img = $this->intervention->make($image_path);\n\t\t$img->interlace();\n\t\t\n\t\tif($img->height()>$maxHeight){\n\n\t\t\t// method 1\n\t\t\t// add callback functionality to retain maximal original image size\n\t\t\t$img->fit($maxWidth, $maxHeight, function ($constraint) {\n\t\t\t $constraint->upsize();\n\t\t\t});\n\t\t\n\t\t}else{\n\t\t\t// method 2\n\t\t // resize image to 370x370 and keep the aspect ratio\n\t\t\t$img->resize($maxWidth, $maxHeight, function ($constraint) {\n\t\t\t\t$constraint->aspectRatio();\n\t\t\t});\n\t\t\t\n\t\t\t// Fill up the blank spaces with transparent color\n\t\t\t$img->resizeCanvas($maxWidth, $maxHeight, 'center', false, array(255, 255, 255, 0));\n\t\t}\n\t\t\n\t\t$new_image_path = str_replace(\"-source\", \"-$size_name\", $image_path);\n\t\t$img->save($new_image_path, 80);\n\t\t\n\t\treturn $new_image_path;\n\t}", "public function runFillMaxResize(Image $image, $width, $height) : Image\n {\n\t\treturn $this->runContainResize($image, $width, $height)->resizeCanvas($width, $height, 'center');\n }", "function scale_image($arg)\n\t{\n\t\t// max_width, max_height, cur_width, cur_height\n\t\t\n\t\t$ret = array(\n\t\t\t\t\t 'img_width' => $arg['cur_width'],\n\t\t\t\t\t 'img_height' => $arg['cur_height']\n\t\t\t\t\t);\n\t\t\n\t\tif ( $arg['cur_width'] > $arg['max_width'] )\n\t\t{\n\t\t\t$ret['img_width'] = $arg['max_width'];\n\t\t\t$ret['img_height'] = ceil( ( $arg['cur_height'] * ( ( $arg['max_width'] * 100 ) / $arg['cur_width'] ) ) / 100 );\n\t\t\t$arg['cur_height'] = $ret['img_height'];\n\t\t\t$arg['cur_width'] = $ret['img_width'];\n\t\t}\n\t\t\n\t\tif ( $arg['cur_height'] > $arg['max_height'] )\n\t\t{\n\t\t\t$ret['img_height'] = $arg['max_height'];\n\t\t\t$ret['img_width'] = ceil( ( $arg['cur_width'] * ( ( $arg['max_height'] * 100 ) / $arg['cur_height'] ) ) / 100 );\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "private function __setOptimalSizeByLandscape() {\n \n $ratio = $this->__originalImageHeight / $this->__originalImageWidth;\n $newHeight = $this->__requestedWidth * $ratio;\n \n $this->__optimalWidth = $this->__requestedWidth;\n $this->__optimalHeight = $newHeight;\n \n }", "private function __setOptimalSizeByAuto() {\n \n if ($this->__originalImageHeight < $this->__originalImageWidth) {\n $this->__setOptimalSizeByLandscape();\n }\n \n if ($this->__originalImageHeight > $this->__originalImageWidth) {\n $this->__setOptimalSizeByPortrait();\n }\n \n if ($this->__requestedHeight < $this->__requestedWidth) {\n $this->__setOptimalSizeByLandscape();\n }\n \n if ($this->__requestedHeight > $this->__requestedWidth) {\n $this->__setOptimalSizeByPortrait();\n }\n \n if (empty($this->__optimalHeight) && empty($this->__optimalWidth)) {\n $this->__optimalWidth = $this->__requestedWidth;\n $this->__optimalHeight = $this->__requestedHeight;\n }\n \n }", "function resize_image($image, $max_width, $max_height) {\n\t$width = imagesx($image);\n\t$height = imagesy($image);\n\t\n\tif ($width <= $max_width && $height <= $max_height) {\n\t\t// Don't bother if the image is already under the limits\n\t\treturn true;\n\t} else {\n\t\t// Set immediately transparency mode on the source image\n\t\timagealphablending($image, true);\n\t\n\t\t$ratio = $width / $height;\n\t\tif ($ratio > 1) { // width > height\n\t\t\t$n_width = $max_width;\n\t\t\t$n_height = round($height * $max_width / $width);\n\t\t} else {\n\t\t\t$n_width = round($width * $max_height / $height);\n\t\t\t$n_height = $max_height;\n\t\t}\n\t\t$dst_image = imagecreatetruecolor($n_width, $n_height);\n\t\timagealphablending($dst_image, false); \n\t\timagesavealpha($dst_image, true);\n\t\timagecopyresampled($dst_image, $image, 0, 0, 0, 0, $n_width, $n_height, $width, $height);\n\t}\n\treturn $dst_image;\n}", "function minimize_image($image_url, $min_height='', $min_width='')\n{\n\t$img_settings = getimagesize($image_url);\n\tif($min_height != '' && $img_settings[1] > $min_height){\n\t\t$min_height = $min_height;\n\t\t$min_width = $img_settings[0]*($min_height/$img_settings[1]);\n\t}\n\telse if($min_width != '' && $img_settings[0] > $min_width){\n\t\t$min_height = $img_settings[1]*($min_width/$img_settings[0]);\n\t\t$min_width = $min_width; \n\t}\n\telse\n\t{\n\t\t$min_height = $img_settings[1];\n\t\t$min_width = $img_settings[0];\n\t}\n\t\n\treturn array('width'=>$min_width, 'height'=>$min_height, 'actualwidth'=>$img_settings[0], 'actualheight'=>$img_settings[1]);\n}", "function scaleMaxX($new_x)\r\n {\r\n $new_y = round(($new_x / $this->img_x) * $this->img_y, 0);\r\n return $this->_resize($new_x, $new_y);\r\n }", "protected function scaleImages() {}", "function normal_resize_image($source, $destination, $image_type, $max_size, $image_width, $image_height, $quality){\n\n if($image_width <= 0 || $image_height <= 0){return false;} //return false if nothing to resize\n\n //do not resize if image is smaller than max size\n if($image_width <= $max_size && $image_height <= $max_size){\n if(save_image($source, $destination, $image_type, $quality)){\n return true;\n }\n }\n\n //Construct a proportional size of new image\n $image_scale\t= min($max_size/$image_width, $max_size/$image_height);\n $new_width\t\t= ceil($image_scale * $image_width);\n $new_height\t\t= ceil($image_scale * $image_height);\n\n $new_canvas\t\t= imagecreatetruecolor( $new_width, $new_height ); //Create a new true color image\n\n //Copy and resize part of an image with resampling\n if(imagecopyresampled($new_canvas, $source, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height)){\n save_image($new_canvas, $destination, $image_type, $quality); //save resized image\n }\n\n return true;\n}", "public function resize($width=null, $height=null, $master=null);", "function resizeImageAndSave(&$imageData, $destinationFileName, $max_width, $max_height, $quality = 0.75, $mentainAspectRatio = false, $forceResize = false)\n\t{\n\t\t$srcImage = $imageData->image;\n\t\t$imageInfo = $imageData->imageInfo;\n\t\t\n\t\t// if only one size is specified\n\t\tif ($max_width == '*' || $max_height == '*')\n\t\t{\n\t\t\t$new_size = $this->calculateSize($imageInfo->width, $imageInfo->height, $max_width, $max_height);\n\t\t\t$max_width = $new_size['width'];\n\t\t\t$max_height = $new_size['height'];\n\t\t}\n\t\t\n\t\t// if no resize needed, save original file\n\t\tif ($imageInfo->height < $max_height && $imageInfo->width < $max_width && !$forceResize)\n\t\t\treturn $this->saveImageObjectToFile($srcImage, $imageInfo->type, $destinationFileName, $quality);\n\t\t\n\t\t$ratio = (($imageInfo->height/$imageInfo->width) - ($max_height/$max_width));\n\t\t\n\t\tif ($mentainAspectRatio)\n\t\t{\n\t\t\tif ($ratio < 0)\n\t\t\t{\n\t\t\t\t$new_width = $max_width;\n\t\t\t\t$new_height = ceil($imageInfo->height * $max_width / $imageInfo->width);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_height = $max_height;\n\t\t\t\t$new_width = ceil($imageInfo->width * $max_height / $imageInfo->height);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$new_width = $max_width;\n\t\t\t$new_height = $max_height;\n\t\t}\n\t\t\t\t\t\t\n\t\t$dstImage = $this->resizeImage($srcImage, $imageInfo->width, $imageInfo->height, $new_width, $new_height);\n\t\t\n\t\tif ($dstImage == false)\n\t\t\treturn false;\n\t\treturn $this->saveImageObjectToFile($dstImage, $imageInfo->type, $destinationFileName, $quality);\n\t}", "function funcs_imageResize(&$width, &$height, $target, $bywidth = null) {\n\tif ($width<=$target && $height<=$target){\n\t\treturn;\n\t}\n\t//takes the larger size of the width and height and applies the \n\t//formula accordingly...this is so this script will work \n\t//dynamically with any size image \n\tif (is_null($bywidth)){\n\t\tif ($width > $height) { \n\t\t\t$percentage = ($target / $width); \n\t\t} else { \n\t\t\t$percentage = ($target / $height); \n\t\t}\n\t}else{\n\t\tif ($bywidth){\n\t\t\t$percentage = ($target / $width);\n\t\t\t//if height would increase as a result\n\t\t\tif ($height < round($height * $percentage)){\n\t\t\t\treturn;\n\t\t\t} \n\t\t}else{\n\t\t\t$percentage = ($target / $height); \n\t\t\t//if width would increase as a result\n\t\t\tif ($width < round($width * $percentage)){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t} \n\t//gets the new value and applies the percentage, then rounds the value \n\t$width = round($width * $percentage); \n\t$height = round($height * $percentage); \n}" ]
[ "0.64798206", "0.6374751", "0.62817496", "0.6263326", "0.6260494", "0.62429357", "0.61854905", "0.61782223", "0.610051", "0.6014141", "0.6002788", "0.5983225", "0.5946629", "0.59023577", "0.59015405", "0.58619773", "0.58607596", "0.5823537", "0.58031416", "0.5801501", "0.57971203", "0.5793585", "0.5783632", "0.5775434", "0.57733315", "0.5770378", "0.5761293", "0.5703793", "0.5695943", "0.56824803" ]
0.7134943
0
Test all secondary routes These are the routes that redirect to the primarys Like /guid, or /post/1 or even /1 if static route enabled
public function testSecondaryRoutes() { /*//Filters disabled during unit tests unless you enable them //I need them enabled because they log the user in as anonymous Route::enableFilters(); // Test /1 redirects to /home $this->call('GET', '/1'); $this->assertRedirectedTo('/home'); // Test /1/anything/here redirects to /home $this->call('GET', '/1/anything/here'); $this->assertRedirectedTo('/home'); // Test /1 redirects to /home $this->call('GET', '/post/1'); $this->assertRedirectedTo('/home'); // Test /9d3e171a-62a9-e958-bdfa-d6f224ca8cad redirects to /home $this->call('GET', '/9d3e171a-62a9-e958-bdfa-d6f224ca8cad'); $this->assertRedirectedTo('/home'); // Test /home2 is post 1 (this is an optional route to post 1) // /home2 displays post 1, it does not redirect to /home $clicksBefore = Router::where('slug', '=', 'home2')->first()->clicks; $response = $this->call('GET', '/home2'); $post = $response->original['post']; $this->assertResponseOk(); $this->assertViewHas('post'); $this->assertEquals(1, $post->id); $this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid); $clicksAfter = Router::where('slug', '=', 'home2')->first()->clicks; $this->assertEquals(++$clicksBefore, $clicksAfter); // Test /home3 which is a disabled route $this->call('GET', '/home3'); $this->assertResponseStatus(404); // ##### Login as mReschke ##### Auth::login(User::find(2)); Auth::user()->login(); // Test /13/blah redirects to /13/mreschke-home-page $this->call('GET', '/13/blah'); $this->assertRedirectedTo('/13/mreschke-home-page'); // Test /13 and /13/ redirects to /13/mreschke-home-page $this->call('GET', '/13'); $this->assertRedirectedTo('/13/mreschke-home-page'); $this->call('GET', '/13/'); $this->assertRedirectedTo('/13/mreschke-home-page'); // Test /13 redirects to /13/mreschke-home-page $this->call('GET', '/post/13'); $this->assertRedirectedTo('/13/mreschke-home-page'); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testOtherRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// /google redirects to http://google.com\n\t\t$clicksBefore = Router::where('slug', '=', 'google')->first()->clicks;\n\t\t$this->call('GET', '/google');\n\t\t$this->assertRedirectedTo('http://google.com');\n\t\t$clicksAfter = Router::where('slug', '=', 'google')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// /google2 is a disabled route\n\t\t$this->call('GET', '/google2');\n\t\t$this->assertResponseStatus(404);\n\n\t\t$this->call('GET', '/99/invalid');\n\t\t$this->assertResponseStatus(404);\n\n\t\t$this->call('GET', '/this/is/invalid');\n\t\t$this->assertResponseStatus(404);\n\t\t\n\n\t\t// Test search route\n\t\t// ??\n\n\t\t// Test net route\n\t\t// ??\n\n\t\t// Test login route\n\t\t$this->call('GET', '/login');\n\t\t$this->assertResponseOk();\n\n\t\t// Test logout route redirects to /\n\t\t$this->call('GET', '/logout');\n\t\t$this->assertRedirectedTo('/');\n\t\t*/\n\n\t}", "public function testPrimaryRoutes()\n\t{\n\t/*\t//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test base route\n\t\t// Should show post id 1\n\t\t$response = $this->call('GET', '/');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\n\t\t// Test /home is post 1\n\t\t$clicksBefore = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$response = $this->call('GET', '/home');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// Test /about is post 2\n\t\t$response = $this->call('GET', '/about');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(2, $post->id);\n\t\t$this->assertEquals('f1112648-782e-aad3-785d-640fcfefaa9b', $post->uuid);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/mreschke-home-page (non named route)\n\t\t$response = $this->call('GET', '/13/mreschke-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(13, $post->id);\n\t\t$this->assertEquals('1a52e0e3-3174-7b2b-a582-03a39e52e34a', $post->uuid);\n\n\t\t// Test /14/squaethem-home-page (non named route)\n\t\t$response = $this->call('GET', '/14/squaethem-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(14, $post->id);\n\t\t$this->assertEquals('e80e907e-50d4-8ed4-70f7-5d1815672966', $post->uuid);\n\t\t*/\n\n\t}", "public function testLegacyRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test /topic/1 redirects to /home\n\t\t$this->call('GET', '/topic/1');\n\t\t$this->assertRedirectedTo('/home');\n\t\t$this->call('GET', '/topic/1/doesnt/matter');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// ?? files/1 does not currently redirect\n\t\t// not sure if it should or not yet\n\t\t*/\n\n\t}", "public function test_route_merge() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Check both routes exist.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertCount( 2, $endpoint );\n\t}", "public function test_route_override() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t'should_exist' => false,\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t'should_exist' => true,\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\t// Check we only have one route.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertCount( 1, $endpoint );\n\n\t\t// Check it's the right one.\n\t\t$this->assertArrayHasKey( 'should_exist', $endpoint[0] );\n\t\t$this->assertTrue( $endpoint[0]['should_exist'] );\n\t}", "public function testBasicRouteMatching() {\n\t\tRouter::connect('/hello', ['controller' => 'Posts', 'action' => 'index']);\n\t\t$expected = ['controller' => 'Posts', 'action' => 'index'];\n\n\t\tforeach (['/hello/', '/hello', 'hello/', 'hello'] as $url) {\n\t\t\t$this->request->url = $url;\n\t\t\t$result = Router::parse($this->request);\n\t\t\t$this->assertEqual($expected, $result->params);\n\t\t\t$this->assertEqual(['controller'], $result->persist);\n\t\t}\n\t}", "public function test_route_canonicalized_multiple() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t\t'callback' => '__return_null',\n\t\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t\t'callback' => '__return_null',\n\t\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t// Check the route was registered correctly.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_raw_endpoint_data();\n\t\t$this->assertArrayHasKey( '/test-ns/test', $endpoints );\n\n\t\t// Check the route was wrapped in an array.\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertArrayNotHasKey( 'callback', $endpoint );\n\t\t$this->assertArrayHasKey( 'namespace', $endpoint );\n\t\t$this->assertSame( 'test-ns', $endpoint['namespace'] );\n\n\t\t$filtered_endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $filtered_endpoints['/test-ns/test'];\n\t\t$this->assertCount( 2, $endpoint );\n\n\t\t// Check for both methods.\n\t\tforeach ( array( 0, 1 ) as $key ) {\n\t\t\t$this->assertArrayHasKey( 'callback', $endpoint[ $key ] );\n\t\t\t$this->assertArrayHasKey( 'methods', $endpoint[ $key ] );\n\t\t\t$this->assertArrayHasKey( 'args', $endpoint[ $key ] );\n\t\t}\n\t}", "function _parse_routes()\n {\n // Do we even have any custom routing to deal with?\n // There is a default scaffolding trigger, so we'll look just for 1\n if (count($this->routes) == 1)\n {\n $this->_set_request($this->uri->segments);\n return;\n }\n\n // Turn the segment array into a URI string\n $uri = implode('/', $this->uri->segments);\n\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri]))\n {\n $this->_set_request(explode('/', $this->routes[$uri]));\n return;\n }\n\n //Art\n $i = $this->_search_by_key($this->routes, self::MAIN, $uri);\n if ($i !== FALSE)\n {\n $this->_set_request(explode('/', $this->routes[$i][self::ROUTE]));\n return;\n }\n\n // Loop through the route array looking for wild-cards\n foreach ($this->routes as $key => $val)\n {\n if(is_int($key))\n {\n $key = $val[self::MAIN];\n $val = $val[self::ROUTE];\n }\n // Convert wild-cards to RegEx\n $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));\n\n // Does the RegEx match?\n if (preg_match('#^'.$key.'$#', $uri))\n {\n // Do we have a back-reference?\n if (strpos($val, '$') !== FALSE AND strpos($key, '(') !== FALSE)\n {\n $val = preg_replace('#^'.$key.'$#', $val, $uri);\n }\n $this->_set_request(explode('/', $val));\n return;\n }\n }\n\n // If we got this far it means we didn't encounter a\n // matching route so we'll set the site default route\n $this->_set_request($this->uri->segments);\n }", "public function testSimpleRoutes() {\n\t\t$rules = array(\n\t\t\t'Index/Index' => '/',\n\t\t\t'Index/Simple' => '/test/simple',\n\t\t\t'Index/Language' => '/test/en',\n\t\t\t'Index/WithoutSlash' => '/test'\n\t\t);\n\n\t\t$controller = null;\n\t\t$action = null;\n\n\t\tforeach ($this->languages as $language) {\n\t\t\tforeach ($rules as $controllerAction => $uri) {\n\t\t\t\t$route = $this->getRouter('/' . $language . $uri, $rules)->getRoute($controller, $action);\n\n\t\t\t\t$this->assertEquals($controllerAction, $route, 'The route for an empty request does not match');\n\t\t\t\t$this->assertEquals($route, $controller . '/' . $action,\n\t\t\t\t\t'The outgoing parameters do not match the returned route');\n\t\t\t}\n\t\t}\n\t}", "public function registerSiteRoutes()\n\t{\n\t\t// NOTE: the second route is used to capture files in subdirectories as well\n\t\treturn array(\n\t\t\t'internal/(?P<id>.\\d*)' => array('action' => 'AssetManagement/Assets/findById'),\n\t\t\t'internal/(?P<directory>.*)/(?P<name>.*)' => array('action' => 'AssetManagement/Assets/findInDirectory')\n\t\t);\n\t}", "public function testUrlCatchAllRoute(): void\n {\n Router::createRouteBuilder('/')\n ->connect('/*', ['controller' => 'Categories', 'action' => 'index']);\n $result = Router::url(['controller' => 'Categories', 'action' => 'index', '0']);\n $this->assertSame('/0', $result);\n\n $expected = [\n 'plugin' => null,\n 'controller' => 'Categories',\n 'action' => 'index',\n 'pass' => ['0'],\n '_matchedRoute' => '/*',\n ];\n $result = Router::parseRequest($this->makeRequest('/0', 'GET'));\n unset($result['_route']);\n $this->assertEquals($expected, $result);\n\n $result = Router::parseRequest($this->makeRequest('0', 'GET'));\n unset($result['_route']);\n $this->assertEquals($expected, $result);\n }", "private static function performStandardRouting(){\n if(!isset($_GET['controller'])) {\n return self::executeController(self::$notSpecifiedFallbackController, $_GET);\n } else if(empty($_GET['controller'])) {\n return false;\n }\n\n return self::executeController($_GET['controller'], $_GET);\n }", "protected function preReRouting()\n {\n\n }", "private function uri_reroute()\n {\n $match = false;\n\n $uri = parse_url($_SERVER['REQUEST_URI']);\n if (isset($uri['path']) && $uri['path'] !== \"/\") {\n $_ = preg_split(\"|/|\", $uri['path'], -1, PREG_SPLIT_NO_EMPTY);\n\n $i = 0;\n $route = null;\n $router = null;\n // while ($match === false) {\n // $path = $_[$i];\n\n // if (isset($this->configuration['ROUTES']['/' . $path])) {\n // $match = true;\n // $route = \"/$path\";\n // $router = $this->configuration['ROUTES']['/' . $path];\n // $this->route_map = $route;\n // }\n\n // if (isset($this->configuration['ROUTES'][$path])) {\n // $match = true;\n // $route = \"$path\";\n // $router = $this->configuration['ROUTES'][$path];\n // $this->route_map = $route;\n // }\n\n // ++$i;\n // }\n\n // unset($_);\n // unset($i);\n // unset($uri);\n // unset($path);\n\n if (isset($_) && is_array($_) && count($_) > 0) {\n $path = \"\";\n foreach ($_ as $k => $v) {\n $path .= \"/\" . $v;\n\n if (isset($this->configuration['ROUTES'][$path])) {\n $match = true;\n $route = \"$path\";\n $router = $this->configuration['ROUTES'][$path];\n $this->route_map = $route;\n\n // if(is_array($router['params'])){\n\n // }elseif($router['params'] == \"*\"){\n // break;\n // }\n\n break;\n }\n }\n }\n\n if (isset($router['controller'])) {\n $this->controller = $router['controller'];\n } else {\n $this->controller = \"main\";\n }\n\n if (isset($router['method'])) {\n $this->method = $router['method'];\n } else {\n $this->method = \"index\";\n }\n\n if (isset($router['action']) && isset($this->http)) {\n if (trim(strtolower($router['action'])) != strtolower($this->http->action)) {\n $this->http->http_error(403);\n }\n }\n \n if (isset($router['type']) && isset($router['type'])){\n if (trim(strtolower($router['type'])) == \"json\" && $this->http->type != \"json\"){\n $this->http->http_error(406, \"Form \" . $this->http->action . \" data is not json\");\n }\n }\n\n if (isset($router['params'])) {\n if (is_array($router['params'])) {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (is_array($router['params'])) {\n $_ = $router['params'];\n unset($router['params']);\n\n $router['params'][] = $_;\n unset($_);\n }\n\n $nums_params = count($router['params'][0]);\n\n if ($nums_params > 0) {\n foreach ($router['params'][0] as $k => $v) {\n $this->params[$v] = trim(urldecode($uri[$k]));\n }\n }\n\n $i = 0;\n $x = 0;\n while ($nums_params < $i) {\n if (isset($uri[$x]) && is_value($uri[$x])) {\n $this->params[$router['params'][$i]] = trim(urldecode($uri[$x]));\n ++$i;\n }\n ++$x;\n }\n\n } elseif ($router['params'] != \"*\") {\n return $this->http->http_error(404);\n }\n } else {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (count($uri) > 0) {\n return $this->http->http_error(404);\n }\n }\n\n unset($uri);\n unset($i);\n unset($x);\n unset($route);\n unset($router);\n }\n\n return $match;\n }", "function route_match() {\n global $route;\n global $html;\n global $config;\n global $matched_route;\n\n $url = explode('index.php', $_SERVER['REQUEST_URI']);\n $url = @str_replace('.', '', substr($url[1], 1));\n if(strpos($url, '?') !== false) {\n $url = explode('?', $url);\n $url = $url[0];\n }\n\n if(!$url) {\n $matched_route = 'ROOT';\n require_once __DIR__ . '/app/' . $route['ROOT'];\n return true;\n }\n\n if(substr($url, -1) == '/') {\n $url = substr($url, 0, -1);\n }\n\n // Check for simple route match\n if(array_key_exists($url, $route)) {\n $matched_route = $url;\n require_once __DIR__ . '/app/' . $route[$url];\n return true;\n }\n\n // Check for regex\n foreach($route as $r => $page) {\n $matches = array();\n\n if(preg_match('#' . $r . '$#', $url, $matches)) {\n array_shift($matches);\n\n $_GET['custom_arguments'] = $matches;\n\n $matched_route = $r;\n require_once __DIR__ . '/app/' . $page;\n return true;\n }\n }\n\n return false;\n}", "public function hookDefineRoutes($args)\n {\n if (is_admin_theme() && !get_option('clean_url_use_admin')) {\n return;\n }\n\n $router = $args['router'];\n\n $mainPath = get_option('clean_url_main_path');\n $collectionGeneric = get_option('clean_url_collection_generic');\n $itemGeneric = get_option('clean_url_item_generic');\n $fileGeneric = get_option('clean_url_file_generic');\n\n $allowedForItems = unserialize(get_option('clean_url_item_alloweds'));\n $allowedForFiles = unserialize(get_option('clean_url_file_alloweds'));\n\n // Note: order of routes is important: Zend checks from the last one\n // (most specific) to the first one (most generic).\n\n // Get all collections identifiers with one query.\n $collectionsIdentifiers = get_view()->getRecordTypeIdentifiers('Collection', false);\n\n if (!empty($collectionsIdentifiers)) {\n // Use one regex for all collections. Default is case insensitve.\n $collectionsRegex = array_map('preg_quote', $collectionsIdentifiers);\n // To avoid a bug with identifiers that contain a \"/\", that is not\n // escaped with preg_quote().\n $collectionsRegex = '(' . str_replace('/', '\\/', implode('|', $collectionsRegex)) . ')';\n\n // Add a collection route.\n $route = $mainPath . $collectionGeneric;\n $router->addRoute('cleanUrl_collections', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'collection-show',\n ),\n array(\n 'record_identifier' => $collectionsRegex,\n )));\n\n // Add a collection route for files.\n if (in_array('collection', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection / item route for files.\n if (in_array('collection_item', $allowedForFiles)) {\n $router->addRoute('cleanUrl_collections_item_file', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item-file',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n\n // Add a collection route for items.\n if (in_array('collection', $allowedForItems)) {\n $router->addRoute('cleanUrl_collections_item', new Zend_Controller_Router_Route(\n $route . ':collection_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-collection-item',\n ),\n array(\n 'collection_identifier' => $collectionsRegex,\n )));\n }\n }\n\n // Add a generic route for files.\n if (in_array('generic', $allowedForFiles)) {\n $route = $mainPath . $fileGeneric;\n $router->addRoute('cleanUrl_generic_file', new Zend_Controller_Router_Route(\n $route . ':record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic / item route for files.\n if (in_array('generic_item', $allowedForFiles)) {\n $route = $mainPath . $itemGeneric;\n $router->addRoute('cleanUrl_generic_item_file', new Zend_Controller_Router_Route(\n $route . ':item_identifier/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item-file',\n 'collection_id' => NULL,\n )));\n }\n\n // Add a generic route for items.\n if (in_array('generic', $allowedForItems)) {\n $route = $mainPath . trim($itemGeneric, '/');\n $router->addRoute('cleanUrl_generic_items_browse', new Zend_Controller_Router_Route(\n $route,\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'items-browse',\n )));\n $router->addRoute('cleanUrl_generic_item', new Zend_Controller_Router_Route(\n $route . '/:record_identifier',\n array(\n 'module' => 'clean-url',\n 'controller' => 'index',\n 'action' => 'route-item',\n 'collection_id' => NULL,\n )));\n }\n }", "public function matchRoute() {\n\t\tforeach($this->routes as $pattern => $callback) {\n\t\t\tif (preg_match('{^' . $pattern . '$}', $this->url) === 1) {\n\t\t\t\tif(!isset($_SESSION)){ session_start(); }\n\t\t\t\t// Parameters\n\t\t\t\t$params = array();\n\t\t\t\tif (isset($callback['params'])) {\n\t\t\t\t\t$url = explode('/', $this->url);\n\t\t\t\t\t$url = array_slice($url, -1 * count($callback['params']));\n\t\t\t\t\t$params = array_combine(array_keys($callback['params']), $url);\n\t\t\t\t}\n\t\t\t\t// Secured (Backend)\n\t\t\t\tif (isset($callback['secured'])) {\n\t\t\t\t\tif (isset($_SESSION['auth']) && $_SESSION['auth'] === true) {\n\t\t\t\t\t\t$this->dispatch($callback['controller'], $callback['action'], $params);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->url = 'http://' . $_SERVER['SERVER_NAME'] . '/login';\n\t\t\t\t\t\theader('location:' . $this->url);\n\t\t\t\t\t}\n\t\t\t\t// Secured (Frontend)\n\t\t\t\t} elseif (isset($callback['clientsecured'])) {\n\t\t\t\t\tif (isset($_SESSION['fauth']) && $_SESSION['fauth'] === true) {\n\t\t\t\t\t\t$this->dispatch($callback['controller'], $callback['action'], $params);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->url = 'home/login';\n\t\t\t\t\t\theader('location:' . $this->url);\n\t\t\t\t\t}\n\t\t\t\t// Simple\n\t\t\t\t} else {\n\t\t\t\t\t$this->dispatch($callback['controller'], $callback['action'], $params);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// No match\n\t\t$this->dispatch('Default', 'error', array('code' => 404));\n\t\treturn;\n\t}", "static function route () {\n\t\tif (isset($_GET['path'])) {\n\t\t\t$get_path = $_GET['path'];\n\t\t}\n\t\telse {\n\t\t\t$get_path = '/';\n\t\t}\n\n\t\t// check if GET path has a match, show 404 by default if it does not\n\t\t$parameters = [];\n\t\t$controller_method = 'AppController::four_zero_four';\n\n\t\tforeach (self::$routes as $route) {\n\t\t\tif ($route['regex_path'] != '/') {\n\t\t\t\t$route['regex_path'] = trim($route['regex_path'], '/');\n\t\t\t}\n\n\t\t\tif (preg_match('|^'.$route['regex_path'].'$|i', $get_path, $parameters)) {\n\t\t\t\t// match found for GET path\n\t\t\t\tif ($route['auth_required'] == 'not_signed_in' && AppUser::is_signed_in()) {\n\t\t\t\t\t// auth required is not_signed_in and user is signed in, redirect to dashboard\n\t\t\t\t\tRedirector::redirect('dashboard');\n\t\t\t\t}\n\t\t\t\telse if ($route['auth_required'] == 'signed_in' && !AppUser::is_signed_in()) {\n\t\t\t\t\t// auth required is signed in and user is not signed in, redirect to sign in page\n\t\t\t\t\tRedirector::redirect('sign_in');\n\t\t\t\t}\n\n\t\t\t\tif ($route['permission_required'] == null || AppUser::has_permission($route['permission_required'])) {\n\t\t\t\t\t// set controller method if user has permission\n\t\t\t\t\t$controller_method = $route['controller_method'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// user does not have permission, redirect to index\n\t\t\t\t\tRedirector::redirect('/');\n\t\t\t\t}\n\n\t\t\t\t// remove first parameter as it is the GET path and not a value we want\n\t\t\t\tif (!empty($parameters)) {\n\t\t\t\t\tunset($parameters[0]);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// route to the corresponding controller method\n\t\tcall_user_func_array($controller_method, $parameters);\n\t}", "protected function _checkRoutes($segments)\n {\n $routes = $this->_routes;//Config::getInstance()->get('routes');\n $max = count($segments);\n if ($max === 1){\n foreach ($routes as $key=>$value) {\n if ($key == $segments[0]) {\n $segments[0] = $value;\n }\n } \n } else {\n $url = $this->_createUrl($segments);\n foreach ($routes as $key=>$value) {\n if ($key === $url) {\n $url = $value;\n }\n }\n $segments = $this->uri->explodeUrl($url);\n }\n \n $this->_segments = $segments;\n }", "public function routes()\n {\n return [\n 'GET' => [\n 'main' => [\n 'index' => [\n 'name' => 'index'\n ],\n 'services' => [\n 'name' => 'services'\n ],\n 'contacts' => [\n 'name' => 'contacts'\n ],\n 'typography' => [\n 'name' => 'typography'\n ],\n 'test' => [\n 'name' => 'test'\n ],\n 'test1' => [\n 'name' => 'test1'\n ]\n ],\n 'blog' => [\n 'index' => [\n 'name' => 'index'\n ],\n 'create' => [\n 'name' => 'create',\n 'required' => [\n 'auth' => true\n ]\n ],\n 'view' => [\n 'name' => 'view',\n 'required' => [\n 'param' => true\n ]\n ],\n 'edit' => [\n 'name' => 'view',\n 'required' => [\n 'auth' => true,\n 'param' => true\n ]\n ]\n ],\n 'user' => [\n //'index' => 'index',\n 'login' => [\n 'name' => 'login'\n ],\n 'register' => [\n 'name' => 'register'\n ],\n 'logout' => [\n 'name' => 'logout',\n 'required' => [\n 'auth' => true\n ],\n ],\n 'change-password' => [\n 'name' => 'change-password',\n 'required' => [\n 'auth' => true\n ],\n ],\n 'forget-password' => [\n 'name' => 'forget-password',\n 'required' => [\n 'auth' => true\n ],\n ]\n ],\n 'auth' => [\n 'vk' => [\n 'name' => 'vk'\n ]\n ],\n 'config' => [\n 'index' => [\n 'name' => 'index',\n 'required' => [\n 'auth' => true\n ]\n ],\n 'sitemap' => [\n 'name' => 'sitemap',\n 'required' => [\n 'auth' => true\n ]\n ]\n ],\n 'portfolio' => [\n 'view' => [\n 'name' => 'view',\n 'required' => [\n 'param' => true\n ]\n ]\n ],\n 'ajax' => [\n 'template' => [\n 'name' => 'template',\n 'required' => [\n 'ajax' => true\n ]\n ],\n 'test' => [\n 'name' => 'test',\n 'required' => [\n 'ajax' => true\n ]\n ]\n ]\n ],\n 'POST' => [\n 'ajax' => [\n 'form-feedback' => [\n 'name' => 'form-feedback',\n 'required' => [\n 'refer' => 'https://uiweb.ru/'\n ]\n ],\n 'form-backcall' => [\n 'name' => 'form-backcall',\n 'required' => [\n 'refer' => 'https://uiweb.ru/main/contacts'\n ]\n ],\n 'form-login' => [\n 'name' => 'form-login'\n ],\n 'form-register' => [\n 'name' => 'form-register'\n ],\n 'form-change-password' => [\n 'name' => 'form-change-password'\n ]\n ],\n 'blog' => [\n 'create' => [\n 'name' => 'create',\n 'required' => [\n 'auth' => true\n ]\n ],\n 'edit' => [\n 'name' => 'create',\n 'required' => [\n 'auth' => true,\n 'param' => true\n ]\n ]\n ]\n ],\n 'PUT',\n 'PATCH',\n 'TRACE',\n 'DELETE',\n 'HEAD',\n 'OPTIONS'\n ];\n }", "public function routes()\n {\n register_rest_route('can', '/donation-forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'fundraisingPages'\n ],\n ]);\n\n register_rest_route('can', '/forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'forms'\n ],\n ]);\n\n register_rest_route('can', '/petitions', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'petitions'\n ],\n ]);\n\n register_rest_route('can', '/person/add', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'addPerson'\n ],\n ]);\n }", "private static function rerouteCheck()\n {\n if ( ! Session::isValid()) {\n if (Session::hasTrainer()) {\n // we have a trainer but not a student\n self::computeImpliedRoute();\n } else {\n (new LoginTemplate())->display();\n }\n }\n }", "private function parseRoutes()\n {\n // Turn the segment array into a URI string\n $uri = implode('/', $this->uri->getSegments());\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri])) {\n return $this->setRequest(explode('/', $this->routes[$uri]));\n }\n\n // Loop through the route array looking for wild-cards\n foreach ($this->routes as $key => $val) {\n // Convert wild-cards to RegEx\n $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));\n // Does the RegEx match?\n if (preg_match('#^'.$key.'$#', $uri)) {\n // Do we have a back-reference?\n if (strpos($val, '$') !== false && strpos($key, '(') !== false) {\n $val = preg_replace('#^'.$key.'$#', $val, $uri);\n }\n\n return $this->setRequest(explode('/', $val));\n }\n }\n\n // If we got this far it means we didn't encounter a\n // matching route so we'll set the site default route\n $this->setRequest($this->uri->getSegments());\n }", "public function route()\n {\n $this->dashboardRouting($this->relativeCmsUri);\n $this->logOffRouting($this->request, $this->relativeCmsUri);\n $this->apiRouting($this->relativeCmsUri);\n $this->documentRouting($this->userRights, $this->relativeCmsUri);\n $this->valuelistsRouting($this->userRights, $this->relativeCmsUri);\n $this->sitemapRouting($this->userRights, $this->relativeCmsUri);\n $this->redirectRouting($this->userRights, $this->relativeCmsUri);\n $this->imageRouting($this->userRights, $this->relativeCmsUri);\n $this->filesRouting($this->userRights, $this->relativeCmsUri);\n $this->configurationRouting($this->userRights, $this->relativeCmsUri);\n $this->searchRouting($this->relativeCmsUri);\n }", "protected function _parse_routes()\n\t{\n\t\t$uri = implode('/', $this->uri->segments);\n\n\t\t// Get HTTP verb\n\t\t$http_verb = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'cli';\n\n\t\t// Loop through the route array looking for wildcards\n\t\tforeach ($this->routes as $key => $val)\n\t\t{\n\t\t\t// Check if route format is using HTTP verbs\n\t\t\tif (is_array($val))\n\t\t\t{\n\t\t\t\t$val = array_change_key_case($val, CASE_LOWER);\n\t\t\t\tif (isset($val[$http_verb]))\n\t\t\t\t{\n\t\t\t\t\t$val = $val[$http_verb];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert wildcards to RegEx\n\t\t\t$key = str_replace(array(':any', ':num',':all'), array('[^/]+', '[0-9]+','(?!(Techsystem|techsystem|Vindex\\/tech5sManagerControl).*$).*'), $key);\n\t\t\t// $key = str_replace(array(':any', ':num'), array('[^/]+', '[0-9]+'), $key);\n\t\t\t// Does the RegEx match?\n\t\t\tif (preg_match('#^'.$key.'$#', $uri, $matches))\n\t\t\t{\n\t\t\t\t// Are we using callbacks to process back-references?\n\t\t\t\tif ( ! is_string($val) && is_callable($val))\n\t\t\t\t{\n\t\t\t\t\t// Remove the original string from the matches array.\n\t\t\t\t\tarray_shift($matches);\n\n\t\t\t\t\t// Execute the callback using the values in matches as its parameters.\n\t\t\t\t\t$val = call_user_func_array($val, $matches);\n\t\t\t\t}\n\t\t\t\t// Are we using the default routing method for back-references?\n\t\t\t\telseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t$val = preg_replace('#^'.$key.'$#', $val, $uri);\n\t\t\t\t}\n\n\t\t\t\t$this->_set_request(explode('/', $val));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\t// If we got this far it means we didn't encounter a\n\t\t// matching route so we'll set the site default route\n\t\t$this->_set_request(array_values($this->uri->segments));\n\t}", "public function hookDefineRoutes($args)\n {\n $router = $args['router'];\n // Only apply custom routes on public theme.\n // The wildcards on both routes make these routes always apply for the\n // annotation controller.\n\n // get the base path\n/* $bp = get_option('annotation_page_path');\n $router->addRoute('annotationDefault',\n new Zend_Controller_Router_Route('annotation/:action/*',\n array('module' => 'annotation',\n 'controller' => 'annotation',\n 'action' => 'annotate')));\n*/\n if(is_admin_theme()){\n/* $router->addRoute('annotationAdmin',\n new Zend_Controller_Router_Route('annotation/:controller/:action/*',\n array('module' => 'annotation',\n 'controller' => 'index',\n 'action' => 'index')));\n*/\n/* $router->addRoute('cloneAdmin',\n new Zend_Controller_Router_Route('annotation/clone/:action/*',\n array('module' => 'annotation',\n 'controller' => 'clone',\n 'action' => 'clone')));\n*/\n\n }\n }", "function match_against_router() {\n\n require_once APP_PATH . '/config/routing.php';\n\n if (isset($routes)) {\n $base_url = $this->get_base_url();\n\n foreach ($routes as $key => $val) {\n if ($key == $base_url) {\n return $val;\n }\n }\n }\n return false;\n }", "function defineRoutes(&$router) {\n \n // Main\n $router->map('mobile_access', 'm', array('controller' => 'mobile_access', 'action' => 'index'));\n \n $router->map('mobile_access_login', 'm/login', array('controller' => 'mobile_access_auth', 'action' => 'login'));\n $router->map('mobile_access_logout', 'm/logout', array('controller' => 'mobile_access_auth', 'action' => 'logout'));\n $router->map('mobile_access_forgot_password', 'm/forgot-password', array('controller' => 'mobile_access_auth', 'action' => 'forgot_password'));\n \n // Quick Add\n $router->map('mobile_access_quick_add', 'm/starred', array('controller' => 'mobile_access', 'action' => 'quick_add'));\n \n // Assignments\n $router->map('mobile_access_assignments', 'm/assignments', array('controller' => 'mobile_access', 'action' => 'assignments'));\n \n // Starred\n $router->map('mobile_access_starred', 'm/starred', array('controller' => 'mobile_access', 'action' => 'starred'));\n \n // People\n $router->map('mobile_access_people', 'm/people', array('controller' => 'mobile_access_people', 'action' => 'index'));\n $router->map('mobile_access_view_company', 'm/people/:object_id', array('controller' => 'mobile_access_people', 'action' => 'company'), array('object_id' => '\\d+'));\n $router->map('mobile_access_view_user', 'm/people/users/:object_id', array('controller' => 'mobile_access_people', 'action' => 'user'), array('object_id' => '\\d+'));\n \n \n // Projects\n $router->map('mobile_access_projects', 'm/projects', array('controller' => 'mobile_access_projects', 'action' => 'index'));\n \n // Project\n $router->map('mobile_access_view_project', 'm/project/:project_id', array('controller' => 'mobile_access_project', 'action' => 'index'), array('project_id' => '\\d+'));\n \n // Project discusions\n $router->map('mobile_access_view_discussions', 'm/project/:project_id/discussions', array('controller' => 'mobile_access_project_discussions', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_discussion', 'm/project/:project_id/discussions/:object_id', array('controller' => 'mobile_access_project_discussions', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n \n // Project milestones\n $router->map('mobile_access_view_milestones', 'm/project/:project_id/milestones', array('controller' => 'mobile_access_project_milestones', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_milestone', 'm/project/:project_id/milestones/:object_id', array('controller' => 'mobile_access_project_milestones', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n \n // Project files\n $router->map('mobile_access_view_files', 'm/project/:project_id/files', array('controller' => 'mobile_access_project_files', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_file', 'm/project/:project_id/files/:object_id', array('controller' => 'mobile_access_project_files', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+')); \n \n // Project checklists\n $router->map('mobile_access_view_checklists', 'm/project/:project_id/checklists', array('controller' => 'mobile_access_project_checklists', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_checklist', 'm/project/:project_id/checklists/:object_id', array('controller' => 'mobile_access_project_checklists', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+')); \n \n // Project pages\n $router->map('mobile_access_view_pages', 'm/project/:project_id/pages', array('controller' => 'mobile_access_project_pages', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_page', 'm/project/:project_id/pages/:object_id', array('controller' => 'mobile_access_project_pages', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n $router->map('mobile_access_view_page_version', 'm/project/:project_id/pages/:object_id/version/:version', array('controller' => 'mobile_access_project_pages', 'action' => 'version'), array('project_id' => '\\d+', 'object_id' => '\\d+', 'version' => '\\d+'));\n \n // Project tickets\n $router->map('mobile_access_view_tickets', 'm/project/:project_id/tickets', array('controller' => 'mobile_access_project_tickets', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_ticket', 'm/project/:project_id/tickets/:object_id', array('controller' => 'mobile_access_project_tickets', 'action' => 'view'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n \n // Project timerecords\n $router->map('mobile_access_view_timerecords', 'm/project/:project_id/timerecords', array('controller' => 'mobile_access_project_timetracking', 'action' => 'index'), array('project_id' => '\\d+'));\n $router->map('mobile_access_view_timerecord', 'm/project/:project_id/timerecords/:object_id', array('controller' => 'mobile_access_project_timetracking', 'action' => 'index'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n \n // Project subobjects\n $router->map('mobile_access_view_task', 'm/project/:project_id/task/:object_id', array('controller' => 'mobile_access', 'action' => 'view_parent_object'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n $router->map('mobile_access_view_comment', 'm/project/:project_id/comment/:object_id', array('controller' => 'mobile_access', 'action' => 'view_parent_object'), array('project_id' => '\\d+', 'object_id' => '\\d+'));\n $router->map('mobile_access_add_comment', 'm/project/:project_id/comment/add', array('controller' => 'mobile_access_project', 'action' => 'add_comment'));\n \n // Common\n $router->map('mobile_access_view_category', 'm/category/:object_id', array('controller' => 'mobile_access', 'action' => 'view_category', array('object_id' => '\\d+')));\n $router->map('mobile_access_toggle_object_completed_status', 'm/project/:project_id/toggle-completed/:object_id', array('controller' => 'mobile_access', 'action' => 'toggle_completed', array('project_id' => '\\d+', 'object_id' => '\\d+')));\n }", "function _route()\n\t{\n\t\t// if the user login redirect to base\n\t\tif(\\lib\\permission::access('enter:another:session'))\n\t\t{\n\t\t\t// the admin can login by another session\n\t\t\t// never redirect to main\n\t\t}\n\t\telse\n\t\t{\n\t\t\tparent::if_login_not_route();\n\t\t}\n\n\t\t// check remeber me is set\n\t\t// if remeber me is set: login!\n\t\tparent::check_remember_me();\n\n\t\t// save all param-* | param_* in $_GET | $_POST\n\t\t$this->save_param();\n\n\t\tif(self::get_request_method() === 'get')\n\t\t{\n\t\t\t$this->get(false, 'enter')->ALL();\n\t\t}\n\t\telseif(self::get_request_method() === 'post')\n\t\t{\n\t\t\t$this->post('enter')->ALL();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tself::error_method('home');\n\t\t}\n\t}", "public static function check_store($url,$controller,$methode){\n foreach($GLOBALS[\"route_url\"] as $key => $value){\n if(explode(\"/\",$key)[1] === $url && $value[\"controller\"] === $controller && $value[\"method\"] === $methode ){\n\n Wrong::_404(\"route; DOUBLE ROUTING \");\n\n }\n if($key === $url && $value[\"controller\"] === $controller && $value[\"method\"] === $methode ){\n Wrong::_404(\"route; DOUBLE ROUTING \");\n \n \n\n }\n \n \n }\n\n\n\n }" ]
[ "0.7204182", "0.6919818", "0.6698115", "0.6589368", "0.6526395", "0.63424766", "0.6289119", "0.618975", "0.6177964", "0.6166853", "0.6137895", "0.6047036", "0.6030814", "0.5938619", "0.59225214", "0.5891399", "0.586563", "0.58331573", "0.58331037", "0.58169955", "0.5803621", "0.5801889", "0.5770774", "0.57635015", "0.57522905", "0.5742939", "0.57123315", "0.57060546", "0.56945467", "0.5694277" ]
0.7643486
0
Test all legacy routes These are old mrcore4 routes like /topic/1 or /files/1
public function testLegacyRoutes() { /*//Filters disabled during unit tests unless you enable them //I need them enabled because they log the user in as anonymous Route::enableFilters(); // Test /topic/1 redirects to /home $this->call('GET', '/topic/1'); $this->assertRedirectedTo('/home'); $this->call('GET', '/topic/1/doesnt/matter'); $this->assertRedirectedTo('/home'); // ?? files/1 does not currently redirect // not sure if it should or not yet */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testOtherRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// /google redirects to http://google.com\n\t\t$clicksBefore = Router::where('slug', '=', 'google')->first()->clicks;\n\t\t$this->call('GET', '/google');\n\t\t$this->assertRedirectedTo('http://google.com');\n\t\t$clicksAfter = Router::where('slug', '=', 'google')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// /google2 is a disabled route\n\t\t$this->call('GET', '/google2');\n\t\t$this->assertResponseStatus(404);\n\n\t\t$this->call('GET', '/99/invalid');\n\t\t$this->assertResponseStatus(404);\n\n\t\t$this->call('GET', '/this/is/invalid');\n\t\t$this->assertResponseStatus(404);\n\t\t\n\n\t\t// Test search route\n\t\t// ??\n\n\t\t// Test net route\n\t\t// ??\n\n\t\t// Test login route\n\t\t$this->call('GET', '/login');\n\t\t$this->assertResponseOk();\n\n\t\t// Test logout route redirects to /\n\t\t$this->call('GET', '/logout');\n\t\t$this->assertRedirectedTo('/');\n\t\t*/\n\n\t}", "public function test_route_override() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t'should_exist' => false,\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t'should_exist' => true,\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\t// Check we only have one route.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertCount( 1, $endpoint );\n\n\t\t// Check it's the right one.\n\t\t$this->assertArrayHasKey( 'should_exist', $endpoint[0] );\n\t\t$this->assertTrue( $endpoint[0]['should_exist'] );\n\t}", "public function testUrlCatchAllRoute(): void\n {\n Router::createRouteBuilder('/')\n ->connect('/*', ['controller' => 'Categories', 'action' => 'index']);\n $result = Router::url(['controller' => 'Categories', 'action' => 'index', '0']);\n $this->assertSame('/0', $result);\n\n $expected = [\n 'plugin' => null,\n 'controller' => 'Categories',\n 'action' => 'index',\n 'pass' => ['0'],\n '_matchedRoute' => '/*',\n ];\n $result = Router::parseRequest($this->makeRequest('/0', 'GET'));\n unset($result['_route']);\n $this->assertEquals($expected, $result);\n\n $result = Router::parseRequest($this->makeRequest('0', 'GET'));\n unset($result['_route']);\n $this->assertEquals($expected, $result);\n }", "public function testBasicRouteMatching() {\n\t\tRouter::connect('/hello', ['controller' => 'Posts', 'action' => 'index']);\n\t\t$expected = ['controller' => 'Posts', 'action' => 'index'];\n\n\t\tforeach (['/hello/', '/hello', 'hello/', 'hello'] as $url) {\n\t\t\t$this->request->url = $url;\n\t\t\t$result = Router::parse($this->request);\n\t\t\t$this->assertEqual($expected, $result->params);\n\t\t\t$this->assertEqual(['controller'], $result->persist);\n\t\t}\n\t}", "public function testPrimaryRoutes()\n\t{\n\t/*\t//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test base route\n\t\t// Should show post id 1\n\t\t$response = $this->call('GET', '/');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\n\t\t// Test /home is post 1\n\t\t$clicksBefore = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$response = $this->call('GET', '/home');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// Test /about is post 2\n\t\t$response = $this->call('GET', '/about');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(2, $post->id);\n\t\t$this->assertEquals('f1112648-782e-aad3-785d-640fcfefaa9b', $post->uuid);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/mreschke-home-page (non named route)\n\t\t$response = $this->call('GET', '/13/mreschke-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(13, $post->id);\n\t\t$this->assertEquals('1a52e0e3-3174-7b2b-a582-03a39e52e34a', $post->uuid);\n\n\t\t// Test /14/squaethem-home-page (non named route)\n\t\t$response = $this->call('GET', '/14/squaethem-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(14, $post->id);\n\t\t$this->assertEquals('e80e907e-50d4-8ed4-70f7-5d1815672966', $post->uuid);\n\t\t*/\n\n\t}", "public function testRoutes()\n {\n foreach ($this->testRoutes as $method => $testRoutes) {\n switch ($method) {\n case 'GET':\n foreach ($testRoutes as $path => $param) {\n $response = $this->json($method, '/' . $path . $param);\n $response->assertJsonStructure(['error']);\n }\n break;\n case 'PUT':\n case 'POST':\n case 'DELETE':\n foreach ($testRoutes as $path => $params) {\n $response = $this->json($method, '/' . $path . $params['path_params'], $params['request_params']);\n dump($response->getContent());\n $response->assertJsonStructure(['message']);\n }\n break;\n }\n }\n }", "public function testSecondaryRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test /1 redirects to /home\n\t\t$this->call('GET', '/1');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /1/anything/here redirects to /home\n\t\t$this->call('GET', '/1/anything/here');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /1 redirects to /home\n\t\t$this->call('GET', '/post/1');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /9d3e171a-62a9-e958-bdfa-d6f224ca8cad redirects to /home\n\t\t$this->call('GET', '/9d3e171a-62a9-e958-bdfa-d6f224ca8cad');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /home2 is post 1 (this is an optional route to post 1)\n\t\t// /home2 displays post 1, it does not redirect to /home\n\t\t$clicksBefore = Router::where('slug', '=', 'home2')->first()->clicks;\n\t\t$response = $this->call('GET', '/home2');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home2')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\n\t\t// Test /home3 which is a disabled route\n\t\t$this->call('GET', '/home3');\n\t\t$this->assertResponseStatus(404);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/blah redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/13/blah');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\n\t\t// Test /13 and /13/ redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/13');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\t\t$this->call('GET', '/13/');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\n\t\t// Test /13 redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/post/13');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\t\t*/\n\n\t}", "public function testSimpleRoutes() {\n\t\t$rules = array(\n\t\t\t'Index/Index' => '/',\n\t\t\t'Index/Simple' => '/test/simple',\n\t\t\t'Index/Language' => '/test/en',\n\t\t\t'Index/WithoutSlash' => '/test'\n\t\t);\n\n\t\t$controller = null;\n\t\t$action = null;\n\n\t\tforeach ($this->languages as $language) {\n\t\t\tforeach ($rules as $controllerAction => $uri) {\n\t\t\t\t$route = $this->getRouter('/' . $language . $uri, $rules)->getRoute($controller, $action);\n\n\t\t\t\t$this->assertEquals($controllerAction, $route, 'The route for an empty request does not match');\n\t\t\t\t$this->assertEquals($route, $controller . '/' . $action,\n\t\t\t\t\t'The outgoing parameters do not match the returned route');\n\t\t\t}\n\t\t}\n\t}", "public function test_route_canonicalized_multiple() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t\t'callback' => '__return_null',\n\t\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t\t'callback' => '__return_null',\n\t\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t// Check the route was registered correctly.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_raw_endpoint_data();\n\t\t$this->assertArrayHasKey( '/test-ns/test', $endpoints );\n\n\t\t// Check the route was wrapped in an array.\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertArrayNotHasKey( 'callback', $endpoint );\n\t\t$this->assertArrayHasKey( 'namespace', $endpoint );\n\t\t$this->assertSame( 'test-ns', $endpoint['namespace'] );\n\n\t\t$filtered_endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $filtered_endpoints['/test-ns/test'];\n\t\t$this->assertCount( 2, $endpoint );\n\n\t\t// Check for both methods.\n\t\tforeach ( array( 0, 1 ) as $key ) {\n\t\t\t$this->assertArrayHasKey( 'callback', $endpoint[ $key ] );\n\t\t\t$this->assertArrayHasKey( 'methods', $endpoint[ $key ] );\n\t\t\t$this->assertArrayHasKey( 'args', $endpoint[ $key ] );\n\t\t}\n\t}", "private function uri_reroute()\n {\n $match = false;\n\n $uri = parse_url($_SERVER['REQUEST_URI']);\n if (isset($uri['path']) && $uri['path'] !== \"/\") {\n $_ = preg_split(\"|/|\", $uri['path'], -1, PREG_SPLIT_NO_EMPTY);\n\n $i = 0;\n $route = null;\n $router = null;\n // while ($match === false) {\n // $path = $_[$i];\n\n // if (isset($this->configuration['ROUTES']['/' . $path])) {\n // $match = true;\n // $route = \"/$path\";\n // $router = $this->configuration['ROUTES']['/' . $path];\n // $this->route_map = $route;\n // }\n\n // if (isset($this->configuration['ROUTES'][$path])) {\n // $match = true;\n // $route = \"$path\";\n // $router = $this->configuration['ROUTES'][$path];\n // $this->route_map = $route;\n // }\n\n // ++$i;\n // }\n\n // unset($_);\n // unset($i);\n // unset($uri);\n // unset($path);\n\n if (isset($_) && is_array($_) && count($_) > 0) {\n $path = \"\";\n foreach ($_ as $k => $v) {\n $path .= \"/\" . $v;\n\n if (isset($this->configuration['ROUTES'][$path])) {\n $match = true;\n $route = \"$path\";\n $router = $this->configuration['ROUTES'][$path];\n $this->route_map = $route;\n\n // if(is_array($router['params'])){\n\n // }elseif($router['params'] == \"*\"){\n // break;\n // }\n\n break;\n }\n }\n }\n\n if (isset($router['controller'])) {\n $this->controller = $router['controller'];\n } else {\n $this->controller = \"main\";\n }\n\n if (isset($router['method'])) {\n $this->method = $router['method'];\n } else {\n $this->method = \"index\";\n }\n\n if (isset($router['action']) && isset($this->http)) {\n if (trim(strtolower($router['action'])) != strtolower($this->http->action)) {\n $this->http->http_error(403);\n }\n }\n \n if (isset($router['type']) && isset($router['type'])){\n if (trim(strtolower($router['type'])) == \"json\" && $this->http->type != \"json\"){\n $this->http->http_error(406, \"Form \" . $this->http->action . \" data is not json\");\n }\n }\n\n if (isset($router['params'])) {\n if (is_array($router['params'])) {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (is_array($router['params'])) {\n $_ = $router['params'];\n unset($router['params']);\n\n $router['params'][] = $_;\n unset($_);\n }\n\n $nums_params = count($router['params'][0]);\n\n if ($nums_params > 0) {\n foreach ($router['params'][0] as $k => $v) {\n $this->params[$v] = trim(urldecode($uri[$k]));\n }\n }\n\n $i = 0;\n $x = 0;\n while ($nums_params < $i) {\n if (isset($uri[$x]) && is_value($uri[$x])) {\n $this->params[$router['params'][$i]] = trim(urldecode($uri[$x]));\n ++$i;\n }\n ++$x;\n }\n\n } elseif ($router['params'] != \"*\") {\n return $this->http->http_error(404);\n }\n } else {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (count($uri) > 0) {\n return $this->http->http_error(404);\n }\n }\n\n unset($uri);\n unset($i);\n unset($x);\n unset($route);\n unset($router);\n }\n\n return $match;\n }", "public function testGetRoutes()\n {\n $this->disableExceptionHandling();\n\n $this->visit(route('voyager.login'));\n $this->type('[email protected]', 'email');\n $this->type('password', 'password');\n $this->press(__('voyager::generic.login'));\n\n $urls = [\n route('voyager.dashboard'),\n route('voyager.media.index'),\n route('voyager.settings.index'),\n route('voyager.roles.index'),\n route('voyager.roles.create'),\n route('voyager.roles.show', 1),\n route('voyager.roles.edit', 1),\n route('voyager.users.index'),\n route('voyager.users.create'),\n route('voyager.users.show', 1),\n route('voyager.users.edit', 1),\n route('voyager.posts.index'),\n route('voyager.posts.create'),\n route('voyager.posts.show', 1),\n route('voyager.posts.edit', 1),\n route('voyager.pages.index'),\n route('voyager.pages.create'),\n route('voyager.pages.show', 1),\n route('voyager.pages.edit', 1),\n route('voyager.categories.index'),\n route('voyager.categories.create'),\n route('voyager.categories.show', 1),\n route('voyager.categories.edit', 1),\n route('voyager.menus.index'),\n route('voyager.menus.create'),\n route('voyager.menus.show', 1),\n route('voyager.menus.edit', 1),\n route('voyager.database.index'),\n route('voyager.bread.edit', 'categories'),\n route('voyager.database.edit', 'categories'),\n route('voyager.database.create'),\n ];\n\n foreach ($urls as $url) {\n $response = $this->call('GET', $url);\n $this->assertEquals(200, $response->status(), $url.' did not return a 200');\n }\n }", "public function test_route_merge() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Check both routes exist.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertCount( 2, $endpoint );\n\t}", "public function checkingRoute()\n {\n\n global $route;\n $request = new Request;\n $requested_url = $request->server('QUERY_STRING');\n //!TEST\n // echo $requested_url;\n // echo '<br />';\n $requested_method = $request->server('REQUEST_METHOD');\n //! TEST\n // echo $requested_method;\n /* \n // $server_all = $request->serverAll();\n // echo '<pre>';\n // print_r($server_all);\n // echo '</pre>' ;\n // $route_object = new Route;\n */\n $all_routes = $route->getRoutingTable();\n\n // NOTE\n /*\n ! ezzay ana shayf Class Web and Route min 3'eer use key word \n ? routes/web.php & Core/Route.php\n */\n //!TEST\n // echo '<pre>';\n // print_r($all_routes);\n // echo '</pre>';\n\n foreach ($all_routes as $url => $info) {\n\n /* !//? to test $url returns\n echo '<pre>';\n print_r($url);\n echo '</pre>' ;\n */\n // // if ($requested_url == $url){\n if (preg_match($url,$requested_url , $matches )){\n if( $requested_method == strtolower($info['method'])) {\n $this->controller = $info['controller'];\n $this->action = $info['action'];\n $this->params = array_slice($matches , 1);\n return true ;\n }else{\n die(\"405 method does not exist\");\n }\n /* //!deprecated if statement (wrong else statement)\n // if ($requested_url != $single_route) {\n // die('404 url not found');\n // }\n // elseif ($requested_method != $info['method']) {\n // die('405 method not allowed');\n // }\n // else {\n // $this->controller = $info['controller'];\n // $this->method = $info['method'];\n // }\n */\n }\n // echo $this->controller;\n // echo '<br />';\n // echo $this->action ;\n // echo '<br />';\n }\n die(\"404 not found\");\n }", "public function testFindAllByRoute()\n {\n $this->markTestIncomplete('WebTestCases are not implemented yet.');\n }", "public function testRoutes()\n\t{\n\t\t$routes = new Routes();\n\n\t\t$result = $routes->process(array('test', 'test'));\n\n\t\t$this->assertEquals('test', $result);\n\t}", "protected function _parse_routes()\n {\n $uri = implode('/', $this->uri->segments);\n\n // Get HTTP verb\n $http_verb = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'cli';\n\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri])) {\n // Check default routes format\n if (is_string($this->routes[$uri])) {\n $this->_set_request(explode('/', $this->routes[$uri]));\n return;\n }\n // Is there a matching http verb?\n elseif (is_array($this->routes[$uri]) && isset($this->routes[$uri][$http_verb])) {\n $this->_set_request(explode('/', $this->routes[$uri][$http_verb]));\n return;\n }\n }\n\n // decryption of module/controller/function name in admin\n if ($this->config->item('is_admin') == 1) {\n if ($this->config->item('ADMIN_URL_ENCRYPTION') == 'Y') {\n $uri_t = str_replace('admin/', '', $uri);\n if ($uri_t != \"\") {\n require_once(APPPATH . '/libraries/Ci_encrypt.php');\n $CI_Enc = new Ci_encrypt();\n $uri_t_decode = $CI_Enc->decrypt($uri_t, true);\n $CI_Enc->convertEncryptedVars();\n }\n $uri = 'admin/' . $uri_t_decode;\n }\n }\n // Loop through the route array looking for wildcards\n foreach ($this->routes as $key => $val) {\n // Check if route format is using http verb\n if (is_array($val)) {\n if (isset($val[$http_verb])) {\n $val = $val[$http_verb];\n } else {\n continue;\n }\n }\n\n // Convert wildcards to RegEx\n #$key = str_replace(array(':any', ':num'), array('[^/]+', '[0-9]+'), $key);\n $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));\n\n // Does the RegEx match?\n if (preg_match('#^' . $key . '$#', $uri, $matches)) {\n // Are we using callbacks to process back-references?\n if (!is_string($val) && is_callable($val)) {\n // Remove the original string from the matches array.\n array_shift($matches);\n\n // Execute the callback using the values in matches as its parameters.\n $val = call_user_func_array($val, $matches);\n }\n // Are we using the default routing method for back-references?\n elseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE) {\n $val = preg_replace('#^' . $key . '$#', $val, $uri);\n }\n\n $this->_set_request(explode('/', $val));\n return;\n }\n }\n\n // If we got this far it means we didn't encounter a\n // matching route so we'll set the site default route\n $this->_set_request(array_values($this->uri->segments));\n }", "function routes($http, $uri) {\n\n $dispatcher = FastRoute\\simpleDispatcher(function(FastRoute\\RouteCollector $r) {\n $r->addRoute('GET', '/question', 'questions#get_answer');\n $r->addRoute('GET', '/hello', 'questions#get_hello');\n $r->addRoute('GET', '/question/{name}/{id}/', 'questions#get_answer');\n $r->addRoute('GET', '/question/{name}/{id}', 'questions#get_answer');\n });\n\n\n// Strip query string (?foo=bar) and decode URI\n if (false !== $pos = strpos($uri, '?')) {\n $uri = substr($uri, 0, $pos);\n }\n\n $uri = rawurldecode($uri);\n $uri = str_replace(BASENAME_DIR . '/', '', $uri);\n $routeInfo = $dispatcher->dispatch($http, $uri);\n\n switch ($routeInfo[0]) {\n case FastRoute\\Dispatcher::NOT_FOUND:\n core\\basebuild::view('error/404');\n break;\n case FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n $allowedMethods = $routeInfo[1];\n echo 'allowed not found';\n break;\n case FastRoute\\Dispatcher::FOUND:\n\n $handler = explode('#', $routeInfo[1]);\n $build = $handler[0];\n $function = $handler[1];\n $vars = $routeInfo[2];\n $interfaces = APP_INTERFACE . $build;\n $interfaces = new $interfaces();\n $interfaces->$function();\n break;\n }\n}", "public function testCanSendRoute()\n {\n $this->assertEmpty([]);\n\n $routes = $this->app->getRoutes();\n\n foreach ($routes as $route) {\n if ($route->getName() == 'api.oauth') {\n $this->assertContains('POST', $route->getAllowedMethods());\n $this->assertEquals('/api/oauth', $route->getPath());\n }\n }\n }", "function _parse_routes()\n {\n // Do we even have any custom routing to deal with?\n // There is a default scaffolding trigger, so we'll look just for 1\n if (count($this->routes) == 1)\n {\n $this->_set_request($this->uri->segments);\n return;\n }\n\n // Turn the segment array into a URI string\n $uri = implode('/', $this->uri->segments);\n\n // Is there a literal match? If so we're done\n if (isset($this->routes[$uri]))\n {\n $this->_set_request(explode('/', $this->routes[$uri]));\n return;\n }\n\n //Art\n $i = $this->_search_by_key($this->routes, self::MAIN, $uri);\n if ($i !== FALSE)\n {\n $this->_set_request(explode('/', $this->routes[$i][self::ROUTE]));\n return;\n }\n\n // Loop through the route array looking for wild-cards\n foreach ($this->routes as $key => $val)\n {\n if(is_int($key))\n {\n $key = $val[self::MAIN];\n $val = $val[self::ROUTE];\n }\n // Convert wild-cards to RegEx\n $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));\n\n // Does the RegEx match?\n if (preg_match('#^'.$key.'$#', $uri))\n {\n // Do we have a back-reference?\n if (strpos($val, '$') !== FALSE AND strpos($key, '(') !== FALSE)\n {\n $val = preg_replace('#^'.$key.'$#', $val, $uri);\n }\n $this->_set_request(explode('/', $val));\n return;\n }\n }\n\n // If we got this far it means we didn't encounter a\n // matching route so we'll set the site default route\n $this->_set_request($this->uri->segments);\n }", "public function test_route_method_string() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t$routes = $GLOBALS['wp_rest_server']->get_routes();\n\n\t\t$this->assertSame( $routes['/test-ns/test'][0]['methods'], array( 'GET' => true ) );\n\t}", "function ci_use_route(){\n\t\t$c_uri=$this->uri->segments;\n\t\t$c_ruri=$this->uri->rsegments;\n\n\t\t//--- we re-introduice the directori in RURI\n\t\tif($this->router->directory!=''){\n\t\t\tarray_unshift($c_ruri , trim($this->router->directory,'/'));\n\t\t\t$i = 1;\n\t\t\tforeach ($c_ruri as $val) $c_ruri[$i++] = $val;\n\t\t\tunset($c_ruri[0]);\n\t\t}\n\n\t\tif(count($c_uri) > count($c_ruri))return true;\n\t\t//--- Now if URI == RURI => there is no used route.\n\t\tif(count($c_uri) == count($c_ruri)) return (implode('/',$c_uri)==implode('/',$c_ruri))? false:true;\n\n\t\tfor($i=1;$i <= count($c_uri);$i++) {\n\t\t\tif($c_uri[$i]!=$c_ruri[$i]) return true;\n\t\t}\n\t\treturn false;\n\t}", "public function testModuleRoute()\n {\n $modules = 'user|my-admin';\n\n $manager = $this->getUrlManager([\n 'rules' => [\n \"<module:$modules>\" => '<module>',\n \"<module:$modules>/<controller>\" => '<module>/<controller>',\n \"<module:$modules>/<controller>/<action>\" => '<module>/<controller>/<action>',\n '<url:[a-zA-Z0-9-/]+>' => 'site/index',\n ],\n ]);\n\n $result = $manager->parseRequest($this->getRequest('user'));\n $this->assertEquals(['user', []], $result);\n $result = $manager->parseRequest($this->getRequest('user/somecontroller'));\n $this->assertEquals(['user/somecontroller', []], $result);\n $result = $manager->parseRequest($this->getRequest('user/somecontroller/someaction'));\n $this->assertEquals(['user/somecontroller/someaction', []], $result);\n\n $result = $manager->parseRequest($this->getRequest('users/somecontroller/someaction'));\n $this->assertEquals(['site/index', ['url' => 'users/somecontroller/someaction']], $result);\n\n }", "public function testProductRoutes()\n\t{\n\t\t//$response = $this->call('GET', '/admin/website/2/products');\n\t\t\n\t\t//$this->assertEquals(200, $response->status());\n\t}", "public function test_bad_index_route()\n {\n //incorrect uri\n $response = $this->get('api/students/1234');\n $response->assertStatus(404);\n }", "protected function loadBackendRoutes() {}", "public static function getRoutes()\n {\n $routes = new \\FreeFW\\Router\\RouteCollection();\n $paths = [];\n $paths[] = __DIR__ . '/../resource/routes/restful/routes.php';\n foreach ($paths as $onePath) {\n $apiRoutes = @include($onePath);\n if (is_array($apiRoutes)) {\n foreach ($apiRoutes as $routeId => $apiRoute) {\n $myRoute = new \\FreeFW\\Router\\Route();\n $myRoute\n ->setId($routeId)\n ->setMethod($apiRoute[\\FreeFW\\Router\\Route::ROUTE_METHOD])\n ->setUrl($apiRoute[\\FreeFW\\Router\\Route::ROUTE_URL])\n ->setController($apiRoute[\\FreeFW\\Router\\Route::ROUTE_CONTROLLER])\n ->setFunction($apiRoute[\\FreeFW\\Router\\Route::ROUTE_FUNCTION])\n ;\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_ROLE, $apiRoute)) {\n $myRoute->setRole($apiRoute[\\FreeFW\\Router\\Route::ROUTE_ROLE]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_AUTH, $apiRoute)) {\n $myRoute->setAuth($apiRoute[\\FreeFW\\Router\\Route::ROUTE_AUTH]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_INCLUDE, $apiRoute)) {\n $myRoute->setInclude($apiRoute[\\FreeFW\\Router\\Route::ROUTE_INCLUDE]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_MODEL, $apiRoute)) {\n $myRoute->setDefaultModel($apiRoute[\\FreeFW\\Router\\Route::ROUTE_MODEL]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_COLLECTION, $apiRoute)) {\n $myRoute->setCollection($apiRoute[\\FreeFW\\Router\\Route::ROUTE_COLLECTION]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_COMMENT, $apiRoute)) {\n $myRoute->setComment($apiRoute[\\FreeFW\\Router\\Route::ROUTE_COMMENT]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_PARAMETERS, $apiRoute)) {\n $myRoute->setParameters($apiRoute[\\FreeFW\\Router\\Route::ROUTE_PARAMETERS]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_RESULTS, $apiRoute)) {\n $myRoute->setResponses($apiRoute[\\FreeFW\\Router\\Route::ROUTE_RESULTS]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_SCOPE, $apiRoute)) {\n $myRoute->setScope($apiRoute[\\FreeFW\\Router\\Route::ROUTE_SCOPE]);\n }\n $routes->addRoute($myRoute);\n }\n }\n }\n return $routes;\n }", "public function test_route_canonicalized() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Check the route was registered correctly.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_raw_endpoint_data();\n\t\t$this->assertArrayHasKey( '/test-ns/test', $endpoints );\n\n\t\t// Check the route was wrapped in an array.\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertArrayNotHasKey( 'callback', $endpoint );\n\t\t$this->assertArrayHasKey( 'namespace', $endpoint );\n\t\t$this->assertSame( 'test-ns', $endpoint['namespace'] );\n\n\t\t// Grab the filtered data.\n\t\t$filtered_endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$this->assertArrayHasKey( '/test-ns/test', $filtered_endpoints );\n\t\t$endpoint = $filtered_endpoints['/test-ns/test'];\n\t\t$this->assertCount( 1, $endpoint );\n\t\t$this->assertArrayHasKey( 'callback', $endpoint[0] );\n\t\t$this->assertArrayHasKey( 'methods', $endpoint[0] );\n\t\t$this->assertArrayHasKey( 'args', $endpoint[0] );\n\t}", "function create_initial_rest_routes()\n {\n }", "public function testRouteSetsPattern()\n {\n $route1 = new \\Slim\\Route('/foo/bar', function () {});\n $this->assertEquals('/foo/bar', $route1->getPattern());\n }", "public function testUriStrategyRouteReceivesCorrectArguments()\n {\n $collection = new Route\\RouteCollection;\n $collection->setStrategy(new UriStrategy);\n\n $collection->get('/route/{id}/{name}', function ($id, $name) {\n $this->assertEquals('2', $id);\n $this->assertEquals('phil', $name);\n });\n\n $dispatcher = $collection->getDispatcher();\n $response = $dispatcher->dispatch('GET', '/route/2/phil');\n }" ]
[ "0.68819845", "0.6517291", "0.6515215", "0.64230275", "0.63861775", "0.637783", "0.6365655", "0.6297713", "0.6234368", "0.6229927", "0.6049419", "0.6035521", "0.6035405", "0.59113884", "0.5872114", "0.5870536", "0.5868843", "0.5864645", "0.5854764", "0.58521515", "0.5803533", "0.57803166", "0.5777471", "0.5777134", "0.57770914", "0.5773484", "0.5771265", "0.574474", "0.5693633", "0.56914" ]
0.818495
0
Test all other routes
public function testOtherRoutes() { /*//Filters disabled during unit tests unless you enable them //I need them enabled because they log the user in as anonymous Route::enableFilters(); // /google redirects to http://google.com $clicksBefore = Router::where('slug', '=', 'google')->first()->clicks; $this->call('GET', '/google'); $this->assertRedirectedTo('http://google.com'); $clicksAfter = Router::where('slug', '=', 'google')->first()->clicks; $this->assertEquals(++$clicksBefore, $clicksAfter); // /google2 is a disabled route $this->call('GET', '/google2'); $this->assertResponseStatus(404); $this->call('GET', '/99/invalid'); $this->assertResponseStatus(404); $this->call('GET', '/this/is/invalid'); $this->assertResponseStatus(404); // Test search route // ?? // Test net route // ?? // Test login route $this->call('GET', '/login'); $this->assertResponseOk(); // Test logout route redirects to / $this->call('GET', '/logout'); $this->assertRedirectedTo('/'); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSecondaryRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test /1 redirects to /home\n\t\t$this->call('GET', '/1');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /1/anything/here redirects to /home\n\t\t$this->call('GET', '/1/anything/here');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /1 redirects to /home\n\t\t$this->call('GET', '/post/1');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /9d3e171a-62a9-e958-bdfa-d6f224ca8cad redirects to /home\n\t\t$this->call('GET', '/9d3e171a-62a9-e958-bdfa-d6f224ca8cad');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /home2 is post 1 (this is an optional route to post 1)\n\t\t// /home2 displays post 1, it does not redirect to /home\n\t\t$clicksBefore = Router::where('slug', '=', 'home2')->first()->clicks;\n\t\t$response = $this->call('GET', '/home2');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home2')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\n\t\t// Test /home3 which is a disabled route\n\t\t$this->call('GET', '/home3');\n\t\t$this->assertResponseStatus(404);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/blah redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/13/blah');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\n\t\t// Test /13 and /13/ redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/13');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\t\t$this->call('GET', '/13/');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\n\t\t// Test /13 redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/post/13');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\t\t*/\n\n\t}", "public function testPrimaryRoutes()\n\t{\n\t/*\t//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test base route\n\t\t// Should show post id 1\n\t\t$response = $this->call('GET', '/');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\n\t\t// Test /home is post 1\n\t\t$clicksBefore = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$response = $this->call('GET', '/home');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// Test /about is post 2\n\t\t$response = $this->call('GET', '/about');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(2, $post->id);\n\t\t$this->assertEquals('f1112648-782e-aad3-785d-640fcfefaa9b', $post->uuid);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/mreschke-home-page (non named route)\n\t\t$response = $this->call('GET', '/13/mreschke-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(13, $post->id);\n\t\t$this->assertEquals('1a52e0e3-3174-7b2b-a582-03a39e52e34a', $post->uuid);\n\n\t\t// Test /14/squaethem-home-page (non named route)\n\t\t$response = $this->call('GET', '/14/squaethem-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(14, $post->id);\n\t\t$this->assertEquals('e80e907e-50d4-8ed4-70f7-5d1815672966', $post->uuid);\n\t\t*/\n\n\t}", "public function testBasicRouteMatching() {\n\t\tRouter::connect('/hello', ['controller' => 'Posts', 'action' => 'index']);\n\t\t$expected = ['controller' => 'Posts', 'action' => 'index'];\n\n\t\tforeach (['/hello/', '/hello', 'hello/', 'hello'] as $url) {\n\t\t\t$this->request->url = $url;\n\t\t\t$result = Router::parse($this->request);\n\t\t\t$this->assertEqual($expected, $result->params);\n\t\t\t$this->assertEqual(['controller'], $result->persist);\n\t\t}\n\t}", "public function testRoutes()\n {\n foreach ($this->testRoutes as $method => $testRoutes) {\n switch ($method) {\n case 'GET':\n foreach ($testRoutes as $path => $param) {\n $response = $this->json($method, '/' . $path . $param);\n $response->assertJsonStructure(['error']);\n }\n break;\n case 'PUT':\n case 'POST':\n case 'DELETE':\n foreach ($testRoutes as $path => $params) {\n $response = $this->json($method, '/' . $path . $params['path_params'], $params['request_params']);\n dump($response->getContent());\n $response->assertJsonStructure(['message']);\n }\n break;\n }\n }\n }", "public function testLegacyRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test /topic/1 redirects to /home\n\t\t$this->call('GET', '/topic/1');\n\t\t$this->assertRedirectedTo('/home');\n\t\t$this->call('GET', '/topic/1/doesnt/matter');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// ?? files/1 does not currently redirect\n\t\t// not sure if it should or not yet\n\t\t*/\n\n\t}", "public function testFindAllByRoute()\n {\n $this->markTestIncomplete('WebTestCases are not implemented yet.');\n }", "public function testUrlCatchAllRoute(): void\n {\n Router::createRouteBuilder('/')\n ->connect('/*', ['controller' => 'Categories', 'action' => 'index']);\n $result = Router::url(['controller' => 'Categories', 'action' => 'index', '0']);\n $this->assertSame('/0', $result);\n\n $expected = [\n 'plugin' => null,\n 'controller' => 'Categories',\n 'action' => 'index',\n 'pass' => ['0'],\n '_matchedRoute' => '/*',\n ];\n $result = Router::parseRequest($this->makeRequest('/0', 'GET'));\n unset($result['_route']);\n $this->assertEquals($expected, $result);\n\n $result = Router::parseRequest($this->makeRequest('0', 'GET'));\n unset($result['_route']);\n $this->assertEquals($expected, $result);\n }", "public function test_route_override() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t'should_exist' => false,\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t'should_exist' => true,\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\t// Check we only have one route.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertCount( 1, $endpoint );\n\n\t\t// Check it's the right one.\n\t\t$this->assertArrayHasKey( 'should_exist', $endpoint[0] );\n\t\t$this->assertTrue( $endpoint[0]['should_exist'] );\n\t}", "public function testGetRoutes()\n {\n $this->disableExceptionHandling();\n\n $this->visit(route('voyager.login'));\n $this->type('[email protected]', 'email');\n $this->type('password', 'password');\n $this->press(__('voyager::generic.login'));\n\n $urls = [\n route('voyager.dashboard'),\n route('voyager.media.index'),\n route('voyager.settings.index'),\n route('voyager.roles.index'),\n route('voyager.roles.create'),\n route('voyager.roles.show', 1),\n route('voyager.roles.edit', 1),\n route('voyager.users.index'),\n route('voyager.users.create'),\n route('voyager.users.show', 1),\n route('voyager.users.edit', 1),\n route('voyager.posts.index'),\n route('voyager.posts.create'),\n route('voyager.posts.show', 1),\n route('voyager.posts.edit', 1),\n route('voyager.pages.index'),\n route('voyager.pages.create'),\n route('voyager.pages.show', 1),\n route('voyager.pages.edit', 1),\n route('voyager.categories.index'),\n route('voyager.categories.create'),\n route('voyager.categories.show', 1),\n route('voyager.categories.edit', 1),\n route('voyager.menus.index'),\n route('voyager.menus.create'),\n route('voyager.menus.show', 1),\n route('voyager.menus.edit', 1),\n route('voyager.database.index'),\n route('voyager.bread.edit', 'categories'),\n route('voyager.database.edit', 'categories'),\n route('voyager.database.create'),\n ];\n\n foreach ($urls as $url) {\n $response = $this->call('GET', $url);\n $this->assertEquals(200, $response->status(), $url.' did not return a 200');\n }\n }", "public function test_AllRoutesNoAuthAvailable()\n {\n //should be possible without any DB entry\n\n Session::start();\n $token = session('_token');\n\n $credentials = array(\n 'email' => '[email protected]',\n 'password' => 'wrongpass',\n '_token' => $token\n );\n\n $session = array(\n '_token' => $token\n );\n\n //index has redirect\n $this->get('/')->assertStatus(302);\n\n //index redirect to login page\n $this->followingRedirects()->get('/')\n ->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Auth Login\n $this->get('/login')->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n $this->followingRedirects()->post('/login', $credentials)->assertStatus(200)\n ->assertViewIs('auth.login');\n\n //Auth Logout POST\n $this->followingRedirects()->post('/logout', ['_token' => $token])->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Auth Logout GET\n $this->get('/logout')->assertStatus(302);\n $this->followingRedirects()->get('/logout')->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Register Message GET\n $this->get('/auth/success')->assertStatus(200)\n ->assertSee('Dein Benutzer muss erst freigeschaltet werden. Du wirst per E-Mail benachrichtigt.')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n // impressum\n $this->get('/impressum')->assertStatus(200)->assertSee('Impressum')->assertSee('Datenschutz');;\n\n // datenschutz\n $this->get('/datenschutz')->assertStatus(200)->assertSee('Impressum')->assertSee('Datenschutz');\n\n // order\n $this->get('/order')->assertStatus(200)\n ->assertSee('Dein Dienstplan')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/basic')->assertStatus(200)\n ->assertSee('Basis Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/module')->assertStatus(200)\n ->assertSee('Modulares Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/support')->assertStatus(200)\n ->assertSee('Support Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //following sites should not be available for guests and redirect to login\n\n //home\n $this->followingRedirects()->get('/home')->assertStatus(200)->assertViewIs('auth.login');\n\n //mailtest\n $this->followingRedirects()->get('/mailtest')->assertStatus(200)->assertViewIs('auth.login');\n\n //pdf extract\n $this->followingRedirects()->get('/pdf')->assertStatus(200)->assertViewIs('auth.login');\n\n //sendService PDF\n $this->followingRedirects()->get('/sendServicePDF')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/sendServicePDF', $session)->assertStatus(419);\n\n //userguide\n $this->followingRedirects()->get('/userguide')->assertStatus(200)->assertViewIs('auth.login');\n\n //superadmin user\n $this->followingRedirects()->get('/superadmin/user')->assertStatus(200)->assertViewIs('auth.login');\n\n //qualification (resource)\n $this->followingRedirects()->get('/qualification')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/qualification', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/qualification/1', $session)->assertStatus(419);\n $this->delete('/qualification/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/qualification/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //user (resource)\n $this->followingRedirects()->get('/user')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/user', $session)->assertStatus(419);\n $this->followingRedirects()->get('/user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/user/1', $session)->assertStatus(419);\n $this->delete('/user/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/user/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/user/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //user approve\n $this->followingRedirects()->get('/user/approve/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/user/approve/1', $session)->assertStatus(419);\n\n //client (resource)\n $this->followingRedirects()->get('/client')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/client/1', $session)->assertStatus(419);\n $this->delete('/client/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/client/create')->assertStatus(200)->assertViewIs('auth.login');\n\n // client apply\n $this->followingRedirects()->get('/clientapply')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/client/1/apply')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/apply', $session)->assertStatus(419);\n $this->delete('/client/1/apply', $session)->assertStatus(419);\n $this->put('/client/1/apply', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/apply/revert')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/apply/revert', $session)->assertStatus(419);\n $this->delete('/client/1/apply/revert', $session)->assertStatus(419);\n $this->put('/client/1/apply/revert', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/removeuser/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/removeuser/1', $session)->assertStatus(419);\n $this->delete('/client/1/removeuser/1', $session)->assertStatus(419);\n $this->put('/client/1/removeuser/1', $session)->assertStatus(419);\n\n //client update module\n $this->followingRedirects()->get('/client/module')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/module', $session)->assertStatus(419);\n $this->delete('/client/module', $session)->assertStatus(419);\n $this->put('/client/module', $session)->assertStatus(419);\n\n //change client\n $this->followingRedirects()->get('/changeclient/1')->assertStatus(200)->assertViewIs('auth.login');\n\n //service (resource)\n $this->followingRedirects()->get('/service')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/servicehistory')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/service/finalize/1')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->post('/service', $session)->assertStatus(419);\n $this->followingRedirects()->get('/service/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/service/1', $session)->assertStatus(419);\n $this->delete('/service/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/service/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/service/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/service/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //training (resource)\n $this->followingRedirects()->get('/training')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/training', $session)->assertStatus(419);\n $this->followingRedirects()->get('/training/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/training/1', $session)->assertStatus(419);\n $this->delete('/training/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/training/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/training/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/training/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //training user\n $this->followingRedirects()->get('/training/training_user/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/training/training_user/1/delete', $session)->assertStatus(419);\n $this->delete('/training/training_user/1/delete', $session)->assertStatus(419);\n $this->put('/training/training_user/1/delete', $session)->assertStatus(419);\n\n //news (resource)\n $this->followingRedirects()->get('/news')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/news', $session)->assertStatus(419);\n $this->followingRedirects()->get('/news/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/news/1', $session)->assertStatus(419);\n $this->delete('/news/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/news/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/news/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/news/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //holiday (resource)\n $this->followingRedirects()->get('/holiday')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/holiday', $session)->assertStatus(419);\n $this->followingRedirects()->get('/holiday/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/holiday/1', $session)->assertStatus(419);\n $this->delete('/holiday/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/holiday/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/holiday/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/holiday/storeservice/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/holiday/storetraining/1')->assertStatus(200)->assertViewIs('auth.login');\n\n // Qualification <-> User\n $this->post('/qualification_user/create', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification_user/delete/1/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/qualification_user/delete/1/1', $session)->assertStatus(419);\n\n // Client <-> User\n $this->post('/client_user/admin', $session)->assertStatus(419);\n $this->post('/client_user/trainingeditor', $session)->assertStatus(419);\n\n //Position\n $this->followingRedirects()->get('/position/1/subscribe')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/subscribe', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/subscribe_user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/subscribe_user/1', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/unsubscribe')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/unsubscribe', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/unsubscribe_user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/unsubscribe_user/1', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/authorize')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/authorize', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/deauthorize')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/deauthorize', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/list_notAuthorized')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/list_notAuthorized', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/position_user')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/position_user', $session)->assertStatus(419);\n\n //Statistic\n $this->followingRedirects()->get('/statistic')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/statistic', $session)->assertStatus(419);\n\n //Calendar\n $this->followingRedirects()->get('/calendar')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/calendar', $session)->assertStatus(419);\n $this->followingRedirects()->get('/calendar/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/calendar/1', $session)->assertStatus(419);\n $this->delete('/calendar/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/calendar/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/calendar/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/calendar/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //Survey\n $this->followingRedirects()->get('/survey')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/survey', $session)->assertStatus(419);\n $this->followingRedirects()->get('/survey/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/survey/1', $session)->assertStatus(419);\n $this->delete('/survey/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/survey/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/survey/create')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->post('/survey/vote/1')->assertStatus(419);\n $this->followingRedirects()->get('/survey/postpone/1')->assertStatus(200)->assertViewIs('auth.login');\n }", "public function test_route_merge() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Check both routes exist.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertCount( 2, $endpoint );\n\t}", "public function testCanSendRoute()\n {\n $this->assertEmpty([]);\n\n $routes = $this->app->getRoutes();\n\n foreach ($routes as $route) {\n if ($route->getName() == 'api.oauth') {\n $this->assertContains('POST', $route->getAllowedMethods());\n $this->assertEquals('/api/oauth', $route->getPath());\n }\n }\n }", "public function testRoutes()\n\t{\n\t\t$routes = new Routes();\n\n\t\t$result = $routes->process(array('test', 'test'));\n\n\t\t$this->assertEquals('test', $result);\n\t}", "public function testSimpleRoutes() {\n\t\t$rules = array(\n\t\t\t'Index/Index' => '/',\n\t\t\t'Index/Simple' => '/test/simple',\n\t\t\t'Index/Language' => '/test/en',\n\t\t\t'Index/WithoutSlash' => '/test'\n\t\t);\n\n\t\t$controller = null;\n\t\t$action = null;\n\n\t\tforeach ($this->languages as $language) {\n\t\t\tforeach ($rules as $controllerAction => $uri) {\n\t\t\t\t$route = $this->getRouter('/' . $language . $uri, $rules)->getRoute($controller, $action);\n\n\t\t\t\t$this->assertEquals($controllerAction, $route, 'The route for an empty request does not match');\n\t\t\t\t$this->assertEquals($route, $controller . '/' . $action,\n\t\t\t\t\t'The outgoing parameters do not match the returned route');\n\t\t\t}\n\t\t}\n\t}", "public function testControllerMethodCatchAll()\n {\n $route = new Route();\n \n $route->set(null, \"user\", null, \"Anax\\Route\\MockHandlerControllerCatchAll\");\n \n $path = \"user/whatever\";\n $this->assertTrue($route->match($path, \"GET\"));\n $res = $route->handle($path);\n $this->assertEquals(\"catchAll\", $res);\n }", "public function test_example()\n {\n $response = $this->get('/');\n $response->assertStatus(302);\n\n $response = $this->get('/dashboard');\n $response->assertStatus(302);\n\n $response = $this->get('/institution');\n $response->assertStatus(302);\n\n $response = $this->get('/institution/create');\n $response->assertStatus(302);\n\n $response = $this->get('/bookings');\n $response->assertStatus(302);\n\n $response = $this->get('/bookings/create');\n $response->assertStatus(302);\n\n $response = $this->get('/bookings/create/rooms');\n $response->assertStatus(302);\n\n $response = $this->get('/rooms/edit');\n $response->assertStatus(302);\n\n $response = $this->get('/rooms/editseats');\n $response->assertStatus(302);\n\n $response = $this->get('/rooms/selectEdit');\n $response->assertStatus(302);\n\n $response = $this->get('/trackAndTrace');\n $response->assertStatus(302);\n\n $response = $this->get('/trackThenTrace');\n $response->assertStatus(404);\n\n $response = $this->get('/editRoom');\n $response->assertStatus(404);\n\n $response = $this->get('/booking');\n $response->assertStatus(404);\n\n $response = $this->get('/showbooking');\n $response->assertStatus(404);\n\n $this->assertTrue(true);\n\n }", "public function test_AllRoutesAsUserAvailable()\n {\n //fill DB with demo data to act like a User\n $this->artisan('demo:createDemoClient');\n\n //session\n Session::start();\n $token = session('_token');\n $credentials = array(\n 'email' => '[email protected]',\n 'password' => 'user',\n '_token' => $token\n );\n\n //act as User\n $user = User::where('name', '=', \"User\")->first();\n\n //Login as User\n //GET|HEAD | login\n $this->get('/login')->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | login\n $this->followingRedirects()->post('/login', $credentials)->assertStatus(200)\n ->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Login: redirect to home\n $this->actingAs($user)->followingRedirects()->get('/login')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | /\n $this->actingAs($user)->followingRedirects()->get('/')\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->post('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->put('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->patch('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->delete('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->actingAs($user)->followingRedirects()->options('/', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | auth/success\n $this->actingAs($user)->followingRedirects()->get('/auth/success')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | captcha/api/{config?}\n $this->actingAs($user)->followingRedirects()->get('/captcha/api/')\n ->assertStatus(200);\n\n //GET|HEAD | captcha/{config?}\n $this->actingAs($user)->followingRedirects()->get('/captcha')\n ->assertStatus(200);\n\n //GET|HEAD | changeclient/{client}\n $this->actingAs($user)->followingRedirects()->get('/changeclient/'.($user->currentclient_id))->assertStatus(200);\n $this->actingAs($user)->followingRedirects()->get('/changeclient/'.($user->currentclient_id+1))->assertStatus(500);\n\n //POST | client\n $this->actingAs($user)->followingRedirects()->post('/client', ['_token' => $token])->assertStatus(402); //not allowed in demo mode\n\n //GET|HEAD | client\n $this->actingAs($user)->followingRedirects()->get('/client')->assertStatus(402); //only as superadmin\n\n //GET|HEAD | client/create\n $this->actingAs($user)->followingRedirects()->get('/client/create')->assertStatus(402); //only as superadmin\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | client/module\n $this->actingAs($user)->followingRedirects()->get('/client/module')->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->post('/client/module', ['_token' => $token,])->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->put('/client/module', ['_token' => $token])->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->patch('/client/module', ['_token' => $token])->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->delete('/client/module', ['_token' => $token])->assertStatus(402); //only as superadmin\n $this->actingAs($user)->followingRedirects()->options('/client/module')->assertStatus(402); //only as superadmin\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | client/{clientid}/apply\n $this->actingAs($user)->get('/client/'.$user->currentclient_id.'/apply')->assertStatus(302);\n $this->actingAs($user)->post('/client/'.$user->currentclient_id.'/apply', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->put('/client/'.$user->currentclient_id.'/apply', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->patch('/client/'.$user->currentclient_id.'/apply', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->delete('/client/'.$user->currentclient_id.'/apply', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->options('/client/'.$user->currentclient_id.'/apply')->assertStatus(302);\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | client/{clientid}/apply/revert\n $this->actingAs($user)->get('/client/'.$user->currentclient_id.'/apply/revert')->assertStatus(302);\n $this->actingAs($user)->post('/client/'.$user->currentclient_id.'/apply/revert', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->put('/client/'.$user->currentclient_id.'/apply/revert', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->patch('/client/'.$user->currentclient_id.'/apply/revert', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->delete('/client/'.$user->currentclient_id.'/apply/revert', ['_token' => $token])->assertStatus(302);\n $this->actingAs($user)->options('/client/'.$user->currentclient_id.'/apply/revert')->assertStatus(302);\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | client/{clientid}/removeuser/{userid}\n $this->actingAs($user)->get('/client/'.$user->currentclient_id.'/removeuser/'.$user->id)->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->post('/client/'.$user->currentclient_id.'/removeuser/'.$user->id, ['_token' => $token])->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->put('/client/'.$user->currentclient_id.'/removeuser/'.$user->id, ['_token' => $token])->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->patch('/client/'.$user->currentclient_id.'/removeuser/'.$user->id, ['_token' => $token])->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->delete('/client/'.$user->currentclient_id.'/removeuser/'.$user->id, ['_token' => $token])->assertStatus(402); //only if admin of client and not in demo mode\n $this->actingAs($user)->options('/client/'.$user->currentclient_id.'/removeuser/'.$user->id)->assertStatus(402); //only if admin of client and not in demo mode\n\n //PUT|PATCH | client/{client}\n $this->actingAs($user)->put('/client/'.$user->currentclient_id, ['_token' => $token])->assertStatus(402); //only if admin of client or superadmin and not in demo mode\n $this->actingAs($user)->patch('/client/'.$user->currentclient_id, ['_token' => $token])->assertStatus(402); //only if admin of client or superadmin and not in demo mode\n\n //GET|HEAD | client/{client}\n $this->actingAs($user)->get('/client/'.$user->currentclient_id)->assertStatus(402); //only if admin of client or superadmin\n\n //DELETE | client/{client}\n $this->actingAs($user)->delete('/client/'.$user->currentclient_id, ['_token' => $token])->assertStatus(402); //only if superadmin and not in demo mode\n\n //GET|HEAD | client/{client}/edit\n $this->actingAs($user)->get('/client/'.$user->currentclient_id.'/edit')->assertStatus(402); //only if admin of client or superadmin\n\n //POST | client_user/admin\n $this->actingAs($user)->post('/client_user/admin', ['_token' => $token, 'client_id' => $user->currentclient_id, 'user_id' => $user->id])\n ->assertStatus(402); //only if admin of client or superadmin\n\n //POST | client_user/trainingeditor\n $this->actingAs($user)->post('/client_user/trainingeditor', ['_token' => $token, 'client_id' => $user->currentclient_id, 'user_id' => $user->id])\n ->assertStatus(402); //only if admin of client or superadmin\n\n //GET|HEAD | clientapply\n $this->actingAs($user)->get('/clientapply')\n ->assertStatus(200)->assertViewIs('client.apply')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | datenschutz\n $this->actingAs($user)->get('/datenschutz')\n ->assertStatus(200)->assertViewIs('legal.datenschutz')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | holiday\n $this->actingAs($user)->followingRedirects()->post('/holiday', ['_token' => $token, 'from' => Carbon::now(), 'to' => Carbon::now()->addDay()])\n ->assertStatus(200);\n\n //GET|HEAD | holiday\n $this->actingAs($user)->get('/holiday')\n ->assertStatus(200)->assertViewIs('holiday.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | holiday/create\n $this->actingAs($user)->get('/holiday/create')\n ->assertStatus(200)->assertViewIs('holiday.create')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | holiday/storeservice/{service}\n $this->actingAs($user)->followingRedirects()->get('/holiday/storeservice/'.Service::first()->id)\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | holiday/storetraining/{training}\n $this->actingAs($user)->followingRedirects()->get('/holiday/storetraining/'.Training::first()->id)\n ->assertStatus(200)->assertViewIs('training.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | holiday/{holiday}\n $this->actingAs($user)->get('/holiday/'.Holiday::first()->id)\n ->assertStatus(200);\n\n //PUT|PATCH | holiday/{holiday}\n $this->actingAs($user)->followingRedirects()->put('/holiday/'.Holiday::first()->id, ['_token' => $token])\n ->assertStatus(200);\n $this->actingAs($user)->followingRedirects()->patch('/holiday/'.Holiday::first()->id, ['_token' => $token])\n ->assertStatus(200);\n\n //GET|HEAD | holiday/{holiday}/edit\n $this->actingAs($user)->followingRedirects()->get('/holiday/'.Training::first()->id.'/edit')\n ->assertStatus(200)->assertViewIs('holiday.edit')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //DELETE | holiday/{holiday}\n $this->actingAs($user)->get('/holiday/'.Holiday::first()->id)\n ->assertStatus(200);\n\n //GET|HEAD | home\n $this->actingAs($user)->get('/home')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | impressum\n $this->actingAs($user)->get('/impressum')\n ->assertStatus(200)->assertViewIs('legal.impressum')\n ->assertSee('Impressum')->assertSee('Datenschutz')\n ->assertSee('Inhaltlich Verantwortlicher gem. ');\n\n //GET|HEAD | mailtest\n $this->actingAs($user)->followingRedirects()->get('/mailtest')\n ->assertStatus(200)->assertViewIs('email.serviceslist')\n ->assertSee('Stand')->assertSee('Uhr')->assertSee('Datum');\n\n //GET|HEAD | news\n $this->actingAs($user)->get('/news')\n ->assertStatus(200)->assertViewIs('news.index');\n\n //POST | news\n $this->actingAs($user)->post('/news', ['_token' => $token])->assertStatus(402); //only admin of client\n\n //GET|HEAD | news/create\n $this->actingAs($user)->get('/news/create')->assertStatus(402); //only admin of client\n\n //GET|HEAD | news/{news}\n $this->actingAs($user)->get('/news/'.News::first()->id)->assertStatus(200);\n\n //DELETE | news/{news}\n $this->actingAs($user)->delete('/news/'.News::first()->id, ['_token' => $token])->assertStatus(402); //only admin of client\n\n //PUT|PATCH | news/{news}\n $this->actingAs($user)->put('/news/'.News::first()->id, ['_token' => $token])->assertStatus(402); //only admin of client\n $this->actingAs($user)->patch('/news/'.News::first()->id, ['_token' => $token])->assertStatus(402); //only admin of client\n\n //GET|HEAD | news/{news}/delete\n $this->actingAs($user)->get('/news/'.News::first()->id.'/delete')->assertStatus(402); //only admin of client\n\n //GET|HEAD | news/{news}/edit\n $this->actingAs($user)->get('/news/'.News::first()->id.'/edit')->assertStatus(402); //only admin of client\n\n //GET|HEAD | order\n $this->actingAs($user)->get('/order')\n ->assertStatus(200)->assertViewIs('order.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | order/create/{package}\n $this->actingAs($user)->get('/order/create/basic')\n ->assertStatus(200)->assertViewIs('order.order')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | order/{package}\n\n //POST | password/email\n $this->actingAs($user)->followingRedirects()->post('/password/email', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | password/reset\n $this->actingAs($user)->followingRedirects()->get('/password/reset')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | password/reset\n $this->actingAs($user)->followingRedirects()->post('/password/reset', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | password/reset/{token}\n\n //GET|HEAD | pdf\n $response = $this->actingAs($user)->get('/pdf');\n self::assertTrue($response->headers->get(\"content-type\") == \"application/pdf\");\n\n //GET|POST|HEAD | position/list_notAuthorized\n $this->actingAs($user)->get('/position/list_notAuthorized')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/list_notAuthorized', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{id}/authorize\n $this->actingAs($user)->get('/position/1/authorize')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/authorize', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{id}/deauthorize\n $this->actingAs($user)->get('/position/1/deauthorize')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/deauthorize', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{id}/position_user\n $this->actingAs($user)->get('/position/1/position_user')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/position_user', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{id}/subscribe\n $this->actingAs($user)->get('/position/1/subscribe')->assertStatus(200);\n $this->actingAs($user)->post('/position/1/subscribe', ['_token' => $token])->assertStatus(200);\n\n //GET|POST|HEAD | position/{id}/unsubscribe\n $this->actingAs($user)->get('/position/1/unsubscribe')->assertStatus(200);\n $this->actingAs($user)->post('/position/1/unsubscribe', ['_token' => $token])->assertStatus(200);\n\n //GET|POST|HEAD | position/{positionid}/subscribe_user/{userid}\n $this->actingAs($user)->get('/position/1/subscribe_user/1')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/subscribe_user/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | position/{positionid}/unsubscribe_user/{userid}\n $this->actingAs($user)->get('/position/1/subscribe_user/1')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/position/1/subscribe_user/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //POST | qualification\n $this->actingAs($user)->post('/qualification', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | qualification\n $this->actingAs($user)->get('/qualification')->assertStatus(402);//only as admin\n\n //GET|HEAD | qualification/create\n $this->actingAs($user)->get('/qualification/create')->assertStatus(402);//only as admin\n\n //PUT|PATCH | qualification/{qualification}\n $this->actingAs($user)->put('/qualification/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //DELETE | qualification/{qualification}\n $this->actingAs($user)->delete('/qualification/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | qualification/{qualification}\n $this->actingAs($user)->get('/qualification/1')->assertStatus(402);//only as admin\n\n //GET|HEAD | qualification/{qualification}/edit\n $this->actingAs($user)->get('/qualification/1/edit')->assertStatus(402);//only as admin\n\n //POST | qualification_user/create\n $this->actingAs($user)->post('/qualification_user/create', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|POST|HEAD | qualification_user/delete/{user_id}/{qualification_id}\n $this->actingAs($user)->get('/qualification_user/delete/1/1')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/qualification_user/delete/1/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | register\n $this->actingAs($user)->followingRedirects()->get('/register')\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //POST | register\n $this->actingAs($user)->followingRedirects()->post('/register', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('home.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|POST|HEAD | sendServicePDF\n $this->actingAs($user)->get('/sendServicePDF')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/sendServicePDF', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | service\n $this->actingAs($user)->get('/service')\n ->assertStatus(200)->assertViewIs('service.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD\n $this->actingAs($user)->get('/servicehistory')->assertStatus(402); //only as admin\n //GET|HEAD\n $this->actingAs($user)->get('/service/finalize/1')->assertStatus(402); //only as admin\n\n //POST | service\n $this->actingAs($user)->post('/service', ['_token' => $token])->assertStatus(403); //only as admin\n\n //GET|HEAD | service/create\n $this->actingAs($user)->get('/service/create')->assertStatus(402);//only as admin\n\n //DELETE | service/{service}\n $this->actingAs($user)->delete('/service/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //PUT|PATCH | service/{service}\n $this->actingAs($user)->put('/service/1', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | service/{service}\n $this->actingAs($user)->get('/service/1')->assertStatus(402);//only as admin\n\n //GET|HEAD | service/{service}/delete\n $this->actingAs($user)->get('/service/1/delete')->assertStatus(402);//only as admin\n\n //GET|HEAD | service/{service}/edit\n $this->actingAs($user)->get('/service/1/edit')->assertStatus(402);//only as admin\n\n //GET|POST|HEAD | statistic\n $this->actingAs($user)->get('/statistic')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/statistic', ['_token' => $token])->assertStatus(402); //only as admin\n\n //GET|HEAD | superadmin/user\n $this->actingAs($user)->get('/superadmin/user')->assertStatus(402);//only as superadmin\n\n //POST | training\n $this->actingAs($user)->followingRedirects()->post('/training', ['_token' => $token])->assertStatus(402); //only as admin or trainingseditor\n\n //GET|HEAD | training\n $this->actingAs($user)->get('/training')\n ->assertStatus(200)->assertViewIs('training.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //GET|HEAD | training/create\n $this->actingAs($user)->get('/training/create')->assertStatus(402);//only as admin\n\n //GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | training/training_user/{training_userid}/delete\n $training_user = Training_user::first();\n $this->actingAs($user)->followingRedirects()->get('/training/training_user/'.$training_user->id.'/delete')\n ->assertStatus(402);//only as admin\n $this->actingAs($user)->followingRedirects()->post('/training/training_user/'.$training_user->id.'/delete', ['_token' => $token])\n ->assertStatus(402);//only as admin\n $this->actingAs($user)->followingRedirects()->put('/training/training_user/'.$training_user->id.'/delete', ['_token' => $token])\n ->assertStatus(402);//only as admin\n $this->actingAs($user)->followingRedirects()->patch('/training/training_user/'.$training_user->id.'/delete', ['_token' => $token])\n ->assertStatus(402);//only as admin\n $this->actingAs($user)->followingRedirects()->delete('/training/training_user/'.$training_user->id.'/delete', ['_token' => $token])\n ->assertStatus(402);//only as admin\n\n //GET|HEAD | training/{training}\n $this->actingAs($user)->get('/training/1')->assertStatus(402);//only as admin or trainingeditor\n\n //PUT|PATCH | training/{training}\n $this->actingAs($user)->put('/training/1', ['_token' => $token])->assertStatus(402);//only as admin or trainingeditor\n\n //DELETE | training/{training}\n $this->actingAs($user)->delete('/training/1', ['_token' => $token])->assertStatus(402);//only as admin or trainingeditor\n\n //GET|HEAD | training/{training}/delete\n $this->actingAs($user)->get('/training/1/delete')->assertStatus(402);//only as admin or trainingeditor\n\n //GET|HEAD | training/{training}/edit\n $this->actingAs($user)->get('/training/1/edit')->assertStatus(402);//only as admin or trainingeditor\n\n //POST | user\n $this->actingAs($user)->post('/user', ['_token' => $token])->assertStatus(402);//not implemented\n\n //GET|HEAD | user\n $this->actingAs($user)->get('/user')->assertStatus(402);//only as admin\n\n //GET|POST|HEAD | user/approve/{id}\n $this->actingAs($user)->get('/user/approve/1')->assertStatus(402);//only as admin\n $this->actingAs($user)->post('/user/approve/1', ['_token' => $token])->assertStatus(402);//only as admin\n\n //GET|HEAD | user/create\n $this->actingAs($user)->get('/user/create')->assertStatus(402);//not implemented\n\n //PUT|PATCH | user/{user}\n //Not allowed in Demo Mode :(\n\n //GET|HEAD | user/{user}\n $this->actingAs($user)->get('/user/1')\n ->assertStatus(200)->assertViewIs('user.profile')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //DELETE | user/{user}\n $this->actingAs($user)->delete('/user/1', ['_token' => $token])->assertStatus(402);//only as superadmin\n\n //GET|HEAD | user/{user}/edit\n $this->actingAs($user)->get('/user/1/edit')->assertStatus(402);//only as admin\n\n //GET|HEAD | userguide\n $response = $this->actingAs($user)->get('/userguide');\n self::assertTrue($response->headers->get(\"content-type\") == \"application/pdf\");\n\n //Calendar\n //GET|HEAD | calendar\n $this->actingAs($user)->followingRedirects()->get('/calendar')\n ->assertStatus(200)->assertViewIs('calendar.index')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n //POST | Calendar\n $this->actingAs($user)->followingRedirects()->post('/calendar', ['_token' => $token])->assertStatus(200)->assertViewIs('calendar.index'); //only as admin or trainingseditor\n //GET | calendar/{calendar}\n $this->actingAs($user)->get('/calendar/1')->assertStatus(402); //only as admin or trainingseditor\n //PUT | calendar/{calendar}\n $this->actingAs($user)->put('/calendar/1', ['_token' => $token])->assertStatus(402); //only as admin or trainingseditor\n //DELETE | calendar/{calendar}\n $this->actingAs($user)->delete('/calendar/1', ['_token' => $token])->assertStatus(402); //only as admin or trainingseditor\n //GET | calendar/{calendar}\n $this->actingAs($user)->get('/calendar/1/edit')->assertStatus(402); //only as admin or trainingseditor\n //GET | calendar/{calendar}\n $this->actingAs($user)->get('/calendar/1/delete')->assertStatus(402); //only as admin or trainingseditor\n //GET|HEAD | alendar/create\n $this->actingAs($user)->get('/calendar/create')->assertStatus(402); //only as admin or trainingseditor\n\n //Survey\n //GET|HEAD survey\n $this->actingAs($user)->get('/survey')->assertStatus(402); //only if admin of client\n //POST survey\n $this->actingAs($user)->post('/survey', ['_token' => $token])->assertStatus(402); //only if admin of client\n //GET|HEAD survey/create\n $this->actingAs($user)->get('/survey/create')->assertStatus(402); //only if admin of client\n //GET|HEAD survey/postpone/{surveyid}\n $this->actingAs($user)->get('/survey/postpone/1')->assertRedirect()->assertCookieMissing('errormessage'); //redirect back on success\n //POST survey/vote/{surveyid}\n $this->actingAs($user)->post('/survey/vote/1', ['_token' => $token, 'value' => \"accept\"])->assertRedirect('/survey/1');\n //GET|HEAD survey/{survey} //set dateStart to yesterday to access a currently activ survey\n $survey = Survey::find(1);\n $survey->dateStart = Carbon::yesterday();\n $survey->save();\n $this->actingAs($user)->get('/survey/1')->assertOk();\n //PUT|PATCH survey/{survey}\n $this->actingAs($user)->put('/survey/1', ['_token' => $token])->assertStatus(402); //only if admin of client\n //DELETE survey/{survey}\n $this->actingAs($user)->delete('/survey/1', ['_token' => $token])->assertStatus(402); //only if admin of client\n //GET|HEAD survey/{survey}/edit\n $this->actingAs($user)->get('/survey/1/edit')->assertStatus(402); //only if admin of client\n\n //POST | logout\n $this->actingAs($user)->followingRedirects()->post('/logout', ['_token' => $token])\n ->assertStatus(200)->assertViewIs('auth.login');\n\n //GET|HEAD | logout\n $this->actingAs($user)->followingRedirects()->get('/logout')\n ->assertStatus(200)->assertViewIs('auth.login');\n }", "public function testControllerMethodCatchAllRequestMethod()\n {\n $route = new Route();\n \n $route->set(null, \"user\", null, \"Anax\\Route\\MockHandlerControllerCatchAll\");\n \n $path = \"user/whatever\";\n $this->assertTrue($route->match($path, \"POST\"));\n $res = $route->handle($path);\n $this->assertEquals(\"catchAllPost\", $res);\n\n $this->assertTrue($route->match($path, \"PUT\"));\n $res = $route->handle($path);\n $this->assertEquals(\"catchAllPut\", $res);\n }", "public function testAddingDefinedRoutes() {\n\n\t\t$router = new Nether\\Avenue\\Router(static::$RequestData['Test']);\n\n\t\t$router->AddRoute('(@)//index','Nether\\Avenue\\RouteTest::Index');\n\t\t$router->AddRoute('(@)//test','Nether\\Avenue\\RouteTest::Test');\n\t\t$routes = $router->GetRoutes();\n\n\t\t(new Verify(\n\t\t\t'check that AddRoute() added the routes',\n\t\t\tcount($routes)\n\t\t))->equals(2);\n\n\t\t(new Verify(\n\t\t\t'check that the route domain condition translated right',\n\t\t\tcurrent($routes)->GetDomain()\n\t\t))->equals('`^(.+?)$`');\n\n\t\t(new Verify(\n\t\t\t'check that the route path condition translated right',\n\t\t\tcurrent($routes)->GetPath()\n\t\t))->equals('`^\\/index$`');\n\n\t\t(new Verify(\n\t\t\t'check that GetRoute() returns an object.',\n\t\t\tis_object($router->GetRoute())\n\t\t))->true();\n\n\t\t(new Verify(\n\t\t\t'check that GetRoute() selected the right route.',\n\t\t\t($router->GetRoute() instanceof Nether\\Avenue\\RouteHandler)\n\t\t))->true();\n\n\t\t(new Verify(\n\t\t\t'check that TranslateRouteHandler() parsed the class right.',\n\t\t\t\"Class: {$router->GetRoute()->GetClass()}, Method: {$router->GetRoute()->GetMethod()}\"\n\t\t))->equals('Class: Nether\\Avenue\\RouteTest, Method: Test');\n\n\t\t(new Verify(\n\t\t\t'check that GetRoute() found the arguments.',\n\t\t\t$router->GetRoute()->GetArgv()[0]\n\t\t))->equals('www.nether.io');\n\n\t\treturn;\n\t}", "public function testRouteRetrieval() {\n\t\t$expected = Router::connect('/hello', ['controller' => 'posts', 'action' => 'index']);\n\t\t$result = Router::get(0, true);\n\t\t$this->assertIdentical($expected, $result);\n\n\t\tlist($result) = Router::get(null, true);\n\t\t$this->assertIdentical($expected, $result);\n\t}", "public function testCatchAll()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n // Test the controller action\n $res = $controller->catchAll();\n $body = $res->getBody();\n $this->assertStringContainsString(\"<h1>Route not found.</h1>\", $body);\n }", "public function testRequestRootIsAndIndex() {\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Index']);\n\n\t\t(new Verify(\n\t\t\t'path / request runs as /index',\n\t\t\t$r1->GetPath()\n\t\t))->equals('/index');\n\n\t\t(new Verify(\n\t\t\t'path /index runs as /index',\n\t\t\t$r2->GetPath()\n\t\t))->equals('/index');\n\n\n\t\treturn;\n\t}", "public function checkingRoute()\n {\n\n global $route;\n $request = new Request;\n $requested_url = $request->server('QUERY_STRING');\n //!TEST\n // echo $requested_url;\n // echo '<br />';\n $requested_method = $request->server('REQUEST_METHOD');\n //! TEST\n // echo $requested_method;\n /* \n // $server_all = $request->serverAll();\n // echo '<pre>';\n // print_r($server_all);\n // echo '</pre>' ;\n // $route_object = new Route;\n */\n $all_routes = $route->getRoutingTable();\n\n // NOTE\n /*\n ! ezzay ana shayf Class Web and Route min 3'eer use key word \n ? routes/web.php & Core/Route.php\n */\n //!TEST\n // echo '<pre>';\n // print_r($all_routes);\n // echo '</pre>';\n\n foreach ($all_routes as $url => $info) {\n\n /* !//? to test $url returns\n echo '<pre>';\n print_r($url);\n echo '</pre>' ;\n */\n // // if ($requested_url == $url){\n if (preg_match($url,$requested_url , $matches )){\n if( $requested_method == strtolower($info['method'])) {\n $this->controller = $info['controller'];\n $this->action = $info['action'];\n $this->params = array_slice($matches , 1);\n return true ;\n }else{\n die(\"405 method does not exist\");\n }\n /* //!deprecated if statement (wrong else statement)\n // if ($requested_url != $single_route) {\n // die('404 url not found');\n // }\n // elseif ($requested_method != $info['method']) {\n // die('405 method not allowed');\n // }\n // else {\n // $this->controller = $info['controller'];\n // $this->method = $info['method'];\n // }\n */\n }\n // echo $this->controller;\n // echo '<br />';\n // echo $this->action ;\n // echo '<br />';\n }\n die(\"404 not found\");\n }", "public function test_route_canonicalized_multiple() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t\t'callback' => '__return_null',\n\t\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t\t'callback' => '__return_null',\n\t\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t// Check the route was registered correctly.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_raw_endpoint_data();\n\t\t$this->assertArrayHasKey( '/test-ns/test', $endpoints );\n\n\t\t// Check the route was wrapped in an array.\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertArrayNotHasKey( 'callback', $endpoint );\n\t\t$this->assertArrayHasKey( 'namespace', $endpoint );\n\t\t$this->assertSame( 'test-ns', $endpoint['namespace'] );\n\n\t\t$filtered_endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $filtered_endpoints['/test-ns/test'];\n\t\t$this->assertCount( 2, $endpoint );\n\n\t\t// Check for both methods.\n\t\tforeach ( array( 0, 1 ) as $key ) {\n\t\t\t$this->assertArrayHasKey( 'callback', $endpoint[ $key ] );\n\t\t\t$this->assertArrayHasKey( 'methods', $endpoint[ $key ] );\n\t\t\t$this->assertArrayHasKey( 'args', $endpoint[ $key ] );\n\t\t}\n\t}", "public function testBasicTest()\n {\n /** @var \\UserFrosting\\Sprinkle\\Core\\Router $router */\n $router = $this->ci->router;\n\n // Get all routes. We should have more than 0 in a default install\n $routes = $router->getRoutes();\n $this->assertNotCount(0, $routes);\n\n // Try to get a path\n $path = $router->pathFor('index');\n $this->assertEquals('/', $path);\n }", "public function testGetRequestWithoutParametersIsRoutedToIndexAction()\n\t{\n\t\t$this->request->setMethod('GET');\n\t\t$this->dispatch('/api/event');\n\n\t\t$this->assertModule('api');\n\t\t$this->assertController('event');\n\t\t$this->assertAction('index');\t\t\n\t}", "public function testGetRouteCollection(): void\n {\n $collection = Router::getRouteCollection();\n $this->assertInstanceOf(RouteCollection::class, $collection);\n $this->assertCount(0, $collection->routes());\n }", "public function testCatchAllGet()\n {\n $res = $this->controller->catchAll();\n $this->assertNull($res);\n }", "public function testAction(){\n $router = $this->get('router.default');\n $rutas = $router->getRouteCollection();\n foreach ($rutas as $ruta) {\n if ($ruta instanceof Route)\n $pathVariables = $ruta->compile()->getPathVariables();\n ld(array(\n 'Ruta' => $ruta->getPath(),\n 'Variables' => $pathVariables\n ));\n }\n ldd();\n }", "public static function routes(): void\n {\n //\n }" ]
[ "0.79910094", "0.7811927", "0.75201195", "0.732454", "0.7244227", "0.71635914", "0.714568", "0.71409196", "0.71266437", "0.711719", "0.7026858", "0.7017001", "0.68593204", "0.6837021", "0.6762935", "0.66284937", "0.659048", "0.65550375", "0.65054977", "0.64900243", "0.6480425", "0.647926", "0.6424198", "0.641931", "0.6404338", "0.63967144", "0.63594735", "0.63302964", "0.6319515", "0.63150144" ]
0.86215246
0
Get the featured companies on the VTC page.
public function getFeatured(): CompanyCollection { return $this->featured; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFeaturedCovered(): CompanyCollection\n {\n return $this->featuredCovered;\n }", "public function getfeaturedCities(){\n\t\t $featuredTestimonial = array();\n\t\t $tData = $this->find('all',array('conditions'=>array('CmsCity.is_display'=>1),\n\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('CmsCity.*'),\n\t\t\t\t\t\t\t\t));\n\t\t if(isset($tData) && !empty($tData)){\n\t\t\t\tforeach($tData as $key=>$testiData){\n\t\t\t\t\tif(isset($testiData['CmsCity']['image']))\n\t\t\t\t\t\t$testiData['CmsCity']['image'] = (!empty($testiData['CmsCity']['image'])) ? Router::url('/'.CMS_IMAGE_URL.$testiData['CmsCity']['image'],true) : \"\";\n\t\t\t\t\t$featuredTestimonial[] = $testiData;\n\t\t\t\t}\t\n\t\t\t}\n\t\treturn $featuredTestimonial;\t\n\t}", "public function featured()\n {\n if($this->isFeatured())\n {\n $featuredObj = FeaturedCompany::where('company_id', $this->id)->first();\n return $featuredObj;\n }\n return false;\n }", "public function index()\n {\n return new FeaturedCollection(FeaturedResource::collection((Product::where('featured', '=', 1)->take(15)->get())));\n }", "public function companies()\n {\n return $this->morphedByMany('App\\Company', 'taggable');\n }", "public function getAllFeaturedProducts()\n {\n $products = Product::/* where('category_id', $id)-> */where('is_featured', 1)->get();\n\n return view('frontend.pages.featuredproduct', compact('products'));\n }", "public function companies(): Collection\n {\n return Company::all();\n }", "public function get_featured_cca_list() \n {\n $this->db->from('cca');\n $this->db->where('featured','1');\n $query = $this->db->get();\n return $query->result();\n }", "public function get_featured_products()\n\t{\n\t\t$this->db->select('product.*, category.category_name, brand.brand_name')->from('product, category, brand')->where(\"product.product_status = 1 AND product.category_id = category.category_id AND product.brand_id = brand.brand_id AND product.featured = 1 AND product.product_balance > 0\")->order_by(\"created\", 'DESC');\n\t\t$query = $this->db->get('',8);\n\t\t\n\t\treturn $query;\n\t}", "public function getFeaturedProducts(): Collection\n\t{\n\t\treturn $this->db->filter(fn (Product $product) => $product->isFeatured);\n\t}", "public function getFeaturedbrand(){\n\t\t \n\t\t $collections = Mage::getModel('brand/brand')->getCollection()\n\t\t\t\t\t\t->addFieldToFilter('is_feature',1);\n\t\t\t\t\n\t\treturn $collections;\n\t }", "function get_service_list() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$services = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT ID, Title\n\t\t\tFROM cp_Categories\n\t\t\tWHERE 1\n\t\t\t\",\n\t\t\tARRAY_A\n\t\t);\n\t\t\n\t\treturn $services;\n\t}", "public function featured($marketplace_name = 'themeforest')\n {\n $url = preg_replace('/set/i', 'features:' . $marketplace_name, $this->public_url);\n return $this->curl($url)->features;\n }", "public function getFeaturedProductCollection()\n {\n return $this->_getProductCollection();\n }", "function get_companies_list() {\n return get_view_data('org_list');\n}", "public function getCompany();", "function ve_get_company_navigation() {\n\n\t/**\n\t * Arguments for get posts:\n\t */\n\t\n\t$args = array(\n\t\t'orderby'\t\t\t=>\t'title',\n\t\t'order'\t\t\t\t=>\t'ASC',\n\t\t'post_type'\t\t\t=>\t'companies',\n\t\t'post_status'\t\t=>\t'publish',\n\t\t'posts_per_page'\t=>\t-1\n\t\t);\n\t$companies = get_posts( $args );\n\n\tforeach ( $companies as $company ) {\n\t\t$company_url = get_permalink($company->ID);\n\t\t$company_title = $company->post_title;\n\t\t?>\n\t\t<li>\n\t\t\t<a class=\"turquoise-hover\" href=\"<?php echo $company_url; ?>\"><?php echo $company_title ?></a>\n\t\t</li>\n\t<?php\n\t}\n}", "public function getFreeCompanies() { return $this->FreeCompanies; }", "public function getProductors ()\n {\n if (empty($this->production)) {\n $this->getCompanyCredits();\n }\n\n return $this->production;\n }", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public function indexCompany()\n {\n return TimelineResource::collection(\n $this->user->company->timeline()\n ->with(['pictures', 'videos', 'geo', 'links'])\n ->paginate(request()->get('per_page') ?? 15)->appends(request()->all())\n );\n }", "public function isFeatured()\n {\n $isFeatured = FeaturedCompany::where([\n ['company_id', '=', $this->id],\n ['end_date', '>=', \\Carbon\\Carbon::now()],\n ])->get();\n if(!$isFeatured->isEmpty())\n {\n return true;\n };\n return false;\n }", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "function get_featured_travelinfo() {\n $sql = \"SELECT * FROM news WHERE parentid='' AND featured='1' ORDER BY id DESC LIMIT 7\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function getRecent(): CompanyCollection\n {\n return $this->recent;\n }", "public function getCompany() {}" ]
[ "0.66041654", "0.62949586", "0.5998069", "0.5930802", "0.5925925", "0.5887295", "0.5881822", "0.57872397", "0.5750885", "0.5621846", "0.562016", "0.5538192", "0.55300665", "0.55181867", "0.5509221", "0.54950464", "0.5485105", "0.5473954", "0.5455649", "0.544388", "0.5436083", "0.5425311", "0.54195803", "0.5411562", "0.5411562", "0.5406832", "0.5403363", "0.5397426", "0.5390592", "0.53879404" ]
0.73709166
0