src/Lablog/Lablog/Category/FileCategory.php
public function getCategory($category)
    {
        $ds = DIRECTORY_SEPARATOR;
        $categoryPath = str_replace('/', $ds, $category);

        $path = app_path().$ds.'lablog'.$ds.$categoryPath;

        if (!$this->exists($category)) {
            return (object) array();
        }

        $categoryExplode = explode('/', $category);
        $categoryName = end($categoryExplode);

        $linkPrefix = \Config::get('lablog::prefix') == '/' ? '' : \Config::get('lablog::prefix');

        $baseCategory = $category;
        $categoryLink = $linkPrefix.'/category/'.$category;
        $fullCategory = $category;

        $category = new Category;
        $category->name = $categoryName;
        $category->link = $baseCategory;
        $category->url = \URL::to($categoryLink);

        return $category;
    }
public function getCategory($category)
    {
        $ds = DIRECTORY_SEPARATOR;
        $categoryPath = str_replace('/', $ds, $category);

        $path = app_path().$ds.'lablog'.$ds.$categoryPath;

        if (!$this->exists($category)) {
            return (object) array();
        }

        $categoryExplode = explode('/', $category);
        $categoryName = end($categoryExplode);

        $linkPrefix = \Config::get('lablog::prefix') == '/' ? '' : \Config::get('lablog::prefix');

        $baseCategory = $category;
        $categoryLink = $linkPrefix.'/category/'.$category;
        $fullCategory = $category;

        $category = new Category;
        $category->name = $categoryName;
        $category->link = $baseCategory;
        $category->url = \URL::to($categoryLink);

        return $category;
    }
public function getCategory ( $ category ) { $ ds = DIRECTORY_SEPARATOR ; $ categoryPath = str_replace ( '/' , $ ds , $ category ) ; $ path = app_path ( ) . $ ds . 'lablog' . $ ds . $ categoryPath ; if ( ! $ this -> exists ( $ category ) ) { return ( object ) array ( ) ; } $ categoryExplode = explode ( '/' , $ category ) ; $ categoryName = end ( $ categoryExplode ) ; $ linkPrefix = \ Config :: get ( 'lablog::prefix' ) == '/' ? '' : \ Config :: get ( 'lablog::prefix' ) ; $ baseCategory = $ category ; $ categoryLink = $ linkPrefix . '/category/' . $ category ; $ fullCategory = $ category ; $ category = new Category ; $ category -> name = $ categoryName ; $ category -> link = $ baseCategory ; $ category -> url = \ URL :: to ( $ categoryLink ) ; return $ category ; }
Get a given category information.
@param  string $category
@return void
Get a given category information .