public function findAll(DTO $dto)
    {
        $sd = get_class($this).(string)serialize($dto);
        $slugs = $this->SystemCache->get($sd);

        if ($slugs === false) {

            $this->loadSource();

            $slugs = array();
            $sort_array = array();

            $dir = 'ASC';

            $orderbys = $dto->getOrderBys();
            if(!empty($orderbys))
                foreach($orderbys as $col => $dir) {}
            else
                $col = 'Slug';

            foreach($this->objectsBySlug as $slug => $obj)
            {

                if(($val = $dto->getParameter('Slug')) != null)
                {
                    if($obj->Slug != $val)
                        continue;
                }

                if(($val = $dto->getParameter('PluginID')) != null)
                {
                    if($obj->PluginID != $val)
                        continue;
                }

                $slugs[] = $slug;

                $sort_array[] = $obj[$col];
            }

            array_multisort($sort_array, strtolower($dir)=='asc'?SORT_ASC:SORT_DESC, SORT_REGULAR, $slugs);
            $this->SystemCache->put($sd, $slugs, 0);
        }


        // retrieve objects
        $rows = $this->multiGetBySlug($slugs);

        $results = array();
        foreach ($slugs as $slug) {
            if(isset($rows[$slug]))
               $results[] = $rows[$slug];
        }

        return $dto->setResults($results);
    }
public function findAll(DTO $dto)
    {
        $sd = get_class($this).(string)serialize($dto);
        $slugs = $this->SystemCache->get($sd);

        if ($slugs === false) {

            $this->loadSource();

            $slugs = array();
            $sort_array = array();

            $dir = 'ASC';

            $orderbys = $dto->getOrderBys();
            if(!empty($orderbys))
                foreach($orderbys as $col => $dir) {}
            else
                $col = 'Slug';

            foreach($this->objectsBySlug as $slug => $obj)
            {

                if(($val = $dto->getParameter('Slug')) != null)
                {
                    if($obj->Slug != $val)
                        continue;
                }

                if(($val = $dto->getParameter('PluginID')) != null)
                {
                    if($obj->PluginID != $val)
                        continue;
                }

                $slugs[] = $slug;

                $sort_array[] = $obj[$col];
            }

            array_multisort($sort_array, strtolower($dir)=='asc'?SORT_ASC:SORT_DESC, SORT_REGULAR, $slugs);
            $this->SystemCache->put($sd, $slugs, 0);
        }


        // retrieve objects
        $rows = $this->multiGetBySlug($slugs);

        $results = array();
        foreach ($slugs as $slug) {
            if(isset($rows[$slug]))
               $results[] = $rows[$slug];
        }

        return $dto->setResults($results);
    }
public function findAll ( DTO $ dto ) { $ sd = get_class ( $ this ) . ( string ) serialize ( $ dto ) ; $ slugs = $ this -> SystemCache -> get ( $ sd ) ; if ( $ slugs === false ) { $ this -> loadSource ( ) ; $ slugs = array ( ) ; $ sort_array = array ( ) ; $ dir = 'ASC' ; $ orderbys = $ dto -> getOrderBys ( ) ; if ( ! empty ( $ orderbys ) ) foreach ( $ orderbys as $ col => $ dir ) { } else $ col = 'Slug' ; foreach ( $ this -> objectsBySlug as $ slug => $ obj ) { if ( ( $ val = $ dto -> getParameter ( 'Slug' ) ) != null ) { if ( $ obj -> Slug != $ val ) continue ; } if ( ( $ val = $ dto -> getParameter ( 'PluginID' ) ) != null ) { if ( $ obj -> PluginID != $ val ) continue ; } $ slugs [ ] = $ slug ; $ sort_array [ ] = $ obj [ $ col ] ; } array_multisort ( $ sort_array , strtolower ( $ dir ) == 'asc' ? SORT_ASC : SORT_DESC , SORT_REGULAR , $ slugs ) ; $ this -> SystemCache -> put ( $ sd , $ slugs , 0 ) ; } // retrieve objects $ rows = $ this -> multiGetBySlug ( $ slugs ) ; $ results = array ( ) ; foreach ( $ slugs as $ slug ) { if ( isset ( $ rows [ $ slug ] ) ) $ results [ ] = $ rows [ $ slug ] ; } return $ dto -> setResults ( $ results ) ; }
Finds Aspects.

@param DTO $dto DTO with supported parameters:
<PrimaryKey>
Slug
PluginID
StartDate    string ModifiedDate is greater than this value
EndDate      string ModifiedDate is less than this value
Search       string Matches part of Name, Slug, or Description

@return DTO A filled DTO
Finds Aspects .