<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

/**
 * CSS parser
 *
 * @author Igor Ratsun
 */
class parser_page_url
{
    protected $ci;

    public function __construct()
    {
        $this->ci = & get_instance();
        $this->ci->load->model('ciext/core_model');
    }

    public function parse($page = '', $parent_id = 0)
    {
        $url = $this->ci->core_model->create_page_url($page, $parent_id);
        
        return ($url == base_url($this->ci->uri->uri_string())) ? '' : $url;
    }

}
