public function items($profileAlias = null)
    {
        $rawItems = empty($this->items) ? [] : $this->items;
        $items = new CollectionDocJsonItems($rawItems, $this);

        // optionally filter based on profile alias
        if ($profileAlias) {
            $filteredRawItems = [];
            foreach ($items as $idx => $item) {
                if ($item->getProfileAlias() == $profileAlias) {
                    $filteredRawItems[] = $rawItems[$idx];
                }
            }
            $items = new CollectionDocJsonItems($filteredRawItems, $this);
        }
        return $items;
    }
public function items($profileAlias = null)
    {
        $rawItems = empty($this->items) ? [] : $this->items;
        $items = new CollectionDocJsonItems($rawItems, $this);

        // optionally filter based on profile alias
        if ($profileAlias) {
            $filteredRawItems = [];
            foreach ($items as $idx => $item) {
                if ($item->getProfileAlias() == $profileAlias) {
                    $filteredRawItems[] = $rawItems[$idx];
                }
            }
            $items = new CollectionDocJsonItems($filteredRawItems, $this);
        }
        return $items;
    }
public function items ( $ profileAlias = null ) { $ rawItems = empty ( $ this -> items ) ? [ ] : $ this -> items ; $ items = new CollectionDocJsonItems ( $ rawItems , $ this ) ; // optionally filter based on profile alias if ( $ profileAlias ) { $ filteredRawItems = [ ] ; foreach ( $ items as $ idx => $ item ) { if ( $ item -> getProfileAlias ( ) == $ profileAlias ) { $ filteredRawItems [ ] = $ rawItems [ $ idx ] ; } } $ items = new CollectionDocJsonItems ( $ filteredRawItems , $ this ) ; } return $ items ; }
Return the set of document items

@param string $profileAlias profile to limit returned items to
@return CollectionDocJsonItems
Return the set of document items