Evernote\Client::findNotes_findInLinkedScopeWithContext PHP Method

findNotes_findInLinkedScopeWithContext() protected method

    protected function findNotes_findInLinkedScopeWithContext($context)
    {
        // Skip linked scope if scope notebook is not a personal linked notebook, or if the
        // linked scope is not included.
        if ($context->scopeNotebook) {
            if (!$context->scopeNotebook->isLinkedNotebook() || !$context->scopeNotebook->isBusinessNotebook()) {
                return $this->findNotes_processResultsWithContext($context);
            }
        } elseif (!$this->isFlagSet($context->scope, self::SEARCH_SCOPE_PERSONAL_LINKED)) {
            return $this->findNotes_processResultsWithContext($context);
        }
        // Build a list of all the linked notebooks that we need to run the search against.
        $context->linkedNotebooksToSearch = array();
        if ($context->scopeNotebook) {
            $context->linkedNotebooksToSearch[] = $context->scopeNotebook;
        } else {
            foreach ($context->allNotebooks as $notebook) {
                if ($notebook->isLinkedNotebook() && !$notebook->isBusinessNotebook()) {
                    $context->linkedNotebooksToSearch[] = $notebook;
                }
            }
        }
        $this->findNotes_nextFindInLinkedScopeWithContext($context);
    }