src/DevMarketer/EasyNav/EasyNav.php
public function isResource($resource, $prefix = NULL, $active = NULL, $strict = false)
	{
		$this->setActive($active);
		if ($prefix && is_string($prefix)) {
			$prefix = str_replace('.', '/', $prefix);
			$search = trim($prefix,'/').'/'.trim($resource, '/');
		} else {
			$search = trim($resource, '/');
		}
		return ($this->pathContains($search, $strict) ? $this->active : '');
	}
public function isResource($resource, $prefix = NULL, $active = NULL, $strict = false)
	{
		$this->setActive($active);
		if ($prefix && is_string($prefix)) {
			$prefix = str_replace('.', '/', $prefix);
			$search = trim($prefix,'/').'/'.trim($resource, '/');
		} else {
			$search = trim($resource, '/');
		}
		return ($this->pathContains($search, $strict) ? $this->active : '');
	}
public function isResource ( $ resource , $ prefix = NULL , $ active = NULL , $ strict = false ) { $ this -> setActive ( $ active ) ; if ( $ prefix && is_string ( $ prefix ) ) { $ prefix = str_replace ( '.' , '/' , $ prefix ) ; $ search = trim ( $ prefix , '/' ) . '/' . trim ( $ resource , '/' ) ; } else { $ search = trim ( $ resource , '/' ) ; } return ( $ this -> pathContains ( $ search , $ strict ) ? $ this -> active : '' ) ; }
Checks if current page is one of a specified resouce
provided in the function. Also accepts a prefix or strict
mode to optionally prevent false-positives

@param 	string				$resource
@param 	string|NULL		$prefix
@param		string 				$active
@param 	bool					$strict
@return	string
Checks if current page is one of a specified resouce provided in the function . Also accepts a prefix or strict mode to optionally prevent false - positives