public function getByID($id)
    {
        if(array_key_exists($id, $this->idToSlugCache))
            $slug = $this->idToSlugCache[$id];
        else
            $slug = $this->SystemCache->get($this->getModel()->getTableName().':id:'.$id);

        if (!empty($slug)) {
            return $this->getBySlug($slug);
        }

        $this->loadSource();

        if(!isset($this->slugsByID[$id]))
            return null;

        $slug = $this->slugsByID[$id];

        return $this->getBySlug($slug);
    }
public function getByID($id)
    {
        if(array_key_exists($id, $this->idToSlugCache))
            $slug = $this->idToSlugCache[$id];
        else
            $slug = $this->SystemCache->get($this->getModel()->getTableName().':id:'.$id);

        if (!empty($slug)) {
            return $this->getBySlug($slug);
        }

        $this->loadSource();

        if(!isset($this->slugsByID[$id]))
            return null;

        $slug = $this->slugsByID[$id];

        return $this->getBySlug($slug);
    }
public function getByID ( $ id ) { if ( array_key_exists ( $ id , $ this -> idToSlugCache ) ) $ slug = $ this -> idToSlugCache [ $ id ] ; else $ slug = $ this -> SystemCache -> get ( $ this -> getModel ( ) -> getTableName ( ) . ':id:' . $ id ) ; if ( ! empty ( $ slug ) ) { return $ this -> getBySlug ( $ slug ) ; } $ this -> loadSource ( ) ; if ( ! isset ( $ this -> slugsByID [ $ id ] ) ) return null ; $ slug = $ this -> slugsByID [ $ id ] ; return $ this -> getBySlug ( $ slug ) ; }
Returns the ModelObject containing the specified ID

@param integer $id The ID of the ModelObject to locate

@return ModelObject
@throws Exception if the Object doesn't exist
Returns the ModelObject containing the specified ID