get all overviews of a segment

@param int $segmentId

@return array
16644
private function getOverviewsOfSegment($segmentId)
    {
        // get specified segment
        $segmentRepository = $this->em->getRepository('KunstmaanDashboardBundle:AnalyticsSegment');
        $segment = $segmentRepository->find($segmentId);

        if (!$segment) {
            throw new \Exception('Unkown segment ID');
        }

        // get the overviews
        return $segment->getOverviews();
    }
167481
protected function _getSegmentValues()
    {
        return array(
            'customer_group_id' => array(self::XML_PATH_SEGMENT_CUSTOMER_GROUP, function () {
                return $this->_noSessionCall ? 0 : Mage::getSingleton('customer/session')->getCustomerGroupId();
            }),
            'store_id' => array(self::XML_PATH_SEGMENT_STORE, function () {
                return Mage::app()->getStore()->getId();
            }),
            'currency' => array(self::XML_PATH_SEGMENT_CURRENCY, function () {
                return Mage::app()->getStore()->getCurrentCurrencyCode();
            })
        );
    }
402848
public function segments(int $index = null)
    {
        $segments = collect(explode('/', $this->path()))
            ->filter(function ($value) {
                return $value !== '';
            })
            ->values()
            ->toArray();

        if (! is_null($index)) {
            return $this->segment($index);
        }

        return $segments;
    }
1370572
private function getSectionId($locationId)
    {
        $location = $this->load($locationId);
        $locationContentInfo = $this->contentHandler->loadContentInfo($location->contentId);

        return $locationContentInfo->sectionId;
    }
735598
public function getSegments() {

            if(!isset($this->segments))
                $this->segments = explode('/', $this->path);

            return $this->segments;

        }
456887
private function getAllChildRoleIds($parentIds)
    {
        $allChildIds = [];

        while (count($parentIds) > 0) {
            $parentIds = $this->getChildIds($parentIds);
            $allChildIds = ArrayHelper::merge($allChildIds, $parentIds);
        };

        return $allChildIds;
    }
634879
protected function actionGetGroups($sectionId)
    {
        $sectionId = intval($sectionId);
        /* @var Gallery_Entity_Table_Group $table */
        $table = ORM::getTable(Eresus_Plugin_Registry::getInstance()->load('gallery'), 'Group');
        $groups = $table->findInSection($sectionId);
        return $groups;
    }
295112
private function getDynamicRouteIds(array $segments): array
    {
        $matched = [];
        $index = 0;

        do {
            $matched[] =
                $this->provider->getRoutesBySegmentValue($index, $segments[$index]) +
                $this->provider->getRoutesBySegmentValue($index, RouteDefinition::DYNAMIC_SEGMENT);
            $index++;
        } while (isset($segments[$index]));

        $matched[] = $this->provider->getRoutesBySegmentCount(\count($segments));

        return array_values(array_intersect_key(... $matched));
    }
887718
public function getSurveyData($surveyId) {
        $tracker = $this->loader->getTracker();

        $survey = $tracker->getSurvey($surveyId);

        $surveyInfo = $survey->getQuestionInformation($this->locale);

        $filteredSurveyInfo = $surveyInfo;
        foreach ($surveyInfo as $questionCode => $questionInfo) {
            if ($questionInfo['class'] == 'question_sub') {
                $parentCode                                           = $questionInfo['title'];
                $parent                                               = $surveyInfo[$parentCode];
                $filteredSurveyInfo[$questionCode]['question'] = $parent['question'] . ' | ' . $questionInfo['question'];
                if (isset($filteredSurveyInfo[$parentCode])) {
                    unset($filteredSurveyInfo[$parentCode]);
                }
            }
        }

        return $filteredSurveyInfo;
    }
315573
private function sortSegmentsCreatedByUserFirst($segments)
    {
        $orderedSegments = array();
        foreach($segments as $id => &$segment) {
            if($segment['login'] == Piwik::getCurrentUserLogin()) {
                $orderedSegments[] = $segment;
                unset($segments[$id]);
            }
        }
        foreach($segments as $id => &$segment) {
            if($segment['enable_all_users'] == 1) {
                $orderedSegments[] = $segment;
                unset($segments[$id]);
            }
        }
        foreach($segments as $id => &$segment) {
            $orderedSegments[] = $segment;
        }
        return $orderedSegments;
    }
608476
public function breadcrumb(String $uri = NULL, Int $segmentCount = -1) 
    {
        $uris = $this->getURIsegments($uri, $segmentCount);
        $list = $this->breadcrumbOlList($uris);

        return $this->breadcrumbNav($list);
    }
330406
public static function getDoneFlags(array $plugins, Segment $segment)
    {
        $doneFlags = array();
        $doneAllPlugins = self::getDoneFlagArchiveContainsAllPlugins($segment);
        $doneFlags[$doneAllPlugins] = $doneAllPlugins;

        $plugins = array_unique($plugins);
        foreach ($plugins as $plugin) {
            $doneOnePlugin = self::getDoneFlagArchiveContainsOnePlugin($segment, $plugin);
            $doneFlags[$plugin] = $doneOnePlugin;
        }
        return $doneFlags;
    }
612865
protected function getURIsegments($uri, $segmentCount)
    {
        if( $uri === NULL)
        {
            $uri = URI::active();
        }

        
        return explode('/' , rtrim(Datatype::divide($uri, '/', 0, $segmentCount), '/'));
    }
400219
def get_segments(segment_id=None):
    """"""
    session = db.get_reader_session()
    with session.begin():
        model = segment_models.NetworkSegment
        segments = session.query(model).filter_unnecessary_segments()
        if segment_id:
            segments = segments.filter(model.id == segment_id)
    return segments.all()
506590
public function getAllSegmentsAndIgnoreVisibility()
    {
        $cacheKey = 'SegmentEditor.getAllSegmentsAndIgnoreVisibility';
        if (!$this->transientCache->contains($cacheKey)) {
            $result = $this->model->getAllSegmentsAndIgnoreVisibility();

            $this->transientCache->save($cacheKey, $result);
        }
        return $this->transientCache->fetch($cacheKey);
    }
467022
private function _readSegmentsFile()
    {
        $segmentsFile = $this->_directory->getFileObject(self::getSegmentFileName($this->_generation));

        $format = $segmentsFile->readInt();

        if ($format == (int)0xFFFFFFFC) {
            $this->_formatVersion = self::FORMAT_2_3;
        } else if ($format == (int)0xFFFFFFFD) {
            $this->_formatVersion = self::FORMAT_2_1;
        } else {
            include_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception('Unsupported segments file format');
        }

        // read version
        $segmentsFile->readLong();

        // read segment name counter
        $segmentsFile->readInt();

        $segments = $segmentsFile->readInt();

        $this->_docCount = 0;

        // read segmentInfos
        for ($count = 0; $count < $segments; $count++) {
            $segName = $segmentsFile->readString();
            $segSize = $segmentsFile->readInt();

            // 2.1+ specific properties
            $delGen = $segmentsFile->readLong();

            if ($this->_formatVersion == self::FORMAT_2_3) {
                $docStoreOffset = $segmentsFile->readInt();

                if ($docStoreOffset != (int)0xFFFFFFFF) {
                    $docStoreSegment        = $segmentsFile->readString();
                    $docStoreIsCompoundFile = $segmentsFile->readByte();

                    $docStoreOptions = array('offset'     => $docStoreOffset,
                                             'segment'    => $docStoreSegment,
                                             'isCompound' => ($docStoreIsCompoundFile == 1));
                } else {
                    $docStoreOptions = null;
                }
            } else {
                $docStoreOptions = null;
            }

            $hasSingleNormFile = $segmentsFile->readByte();
            $numField          = $segmentsFile->readInt();

            $normGens = array();
            if ($numField != (int)0xFFFFFFFF) {
                for ($count1 = 0; $count1 < $numField; $count1++) {
                    $normGens[] = $segmentsFile->readLong();
                }

                include_once 'Zend/Search/Lucene/Exception.php';
                throw new Zend_Search_Lucene_Exception('Separate norm files are not supported. Optimize index to use it with Zend_Search_Lucene.');
            }

            $isCompoundByte     = $segmentsFile->readByte();

            if ($isCompoundByte == 0xFF) {
                // The segment is not a compound file
                $isCompound = false;
            } else if ($isCompoundByte == 0x00) {
                // The status is unknown
                $isCompound = null;
            } else if ($isCompoundByte == 0x01) {
                // The segment is a compound file
                $isCompound = true;
            }

            $this->_docCount += $segSize;

            $this->_segmentInfos[$segName] =
                                new Zend_Search_Lucene_Index_SegmentInfo(
                                    $this->_directory,
                                    $segName,
                                    $segSize,
                                    $delGen,
                                    $docStoreOptions,
                                    $hasSingleNormFile,
                                    $isCompound
                                );
        }
    }
966372
public function get($id = null)
    {
        if (!is_null($id)) {
            if (isset($this->sections[$id])) {
                return $this->sections[$id];
            }
            return;

        }
        return $this->sections;
    }