src/Service/Cdn.php
public function getBucket($bucketIdSlug)
    {
        $aData = ['where' => []];

        if (is_numeric($bucketIdSlug)) {
            $aData['where'][] = ['b.id', $bucketIdSlug];
        } else {
            $aData['where'][] = ['b.slug', $bucketIdSlug];
        }

        $aBuckets = $this->getBuckets(null, null, $aData);

        if (empty($aBuckets)) {
            return false;
        }

        return $aBuckets[0];
    }
public function getBucket($bucketIdSlug)
    {
        $aData = ['where' => []];

        if (is_numeric($bucketIdSlug)) {
            $aData['where'][] = ['b.id', $bucketIdSlug];
        } else {
            $aData['where'][] = ['b.slug', $bucketIdSlug];
        }

        $aBuckets = $this->getBuckets(null, null, $aData);

        if (empty($aBuckets)) {
            return false;
        }

        return $aBuckets[0];
    }
public function getBucket ( $ bucketIdSlug ) { $ aData = [ 'where' => [ ] ] ; if ( is_numeric ( $ bucketIdSlug ) ) { $ aData [ 'where' ] [ ] = [ 'b.id' , $ bucketIdSlug ] ; } else { $ aData [ 'where' ] [ ] = [ 'b.slug' , $ bucketIdSlug ] ; } $ aBuckets = $ this -> getBuckets ( null , null , $ aData ) ; if ( empty ( $ aBuckets ) ) { return false ; } return $ aBuckets [ 0 ] ; }
Returns a single bucket object

@param string

@return  \stdClass|false
Returns a single bucket object