File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed
src/Jenssegers/Mongodb/Relations Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -437,24 +437,6 @@ public function dissociate($ids = array())
437437 return count ($ ids );
438438 }
439439
440- /**
441- * Transform single ID, single Model or array of Models into an array of IDs
442- *
443- * @param mixed $ids
444- * @return array
445- */
446- protected function getIdsArrayFrom ($ ids )
447- {
448- if (! is_array ($ ids )) $ ids = array ($ ids );
449-
450- foreach ($ ids as &$ id )
451- {
452- if ($ id instanceof Model) $ id = $ id ->getKey ();
453- }
454-
455- return $ ids ;
456- }
457-
458440 /**
459441 * Delete alias.
460442 *
@@ -477,6 +459,24 @@ public function attach(Model $model)
477459 return $ this ->save ($ model );
478460 }
479461
462+ /**
463+ * Transform single ID, single Model or array of Models into an array of IDs
464+ *
465+ * @param mixed $ids
466+ * @return array
467+ */
468+ protected function getIdsArrayFrom ($ ids )
469+ {
470+ if (! is_array ($ ids )) $ ids = array ($ ids );
471+
472+ foreach ($ ids as &$ id )
473+ {
474+ if ($ id instanceof Model) $ id = $ id ->getKey ();
475+ }
476+
477+ return $ ids ;
478+ }
479+
480480 /**
481481 * Convert an array of embedded documents to a Collection.
482482 *
You can’t perform that action at this time.
0 commit comments