Question

please read last line of question.

JviewHtml constructor contains following statement

$this->paths = isset($paths) ? $paths : $this->loadPaths();

i am setting the default path of myview using $path variable and passing it to constructor.

$paths = new SplPriorityQueue;
$paths->insert(JPATH_COMPONENT . '/views/' . $viewName . '/tmpl', 'normal');

in net beans debugger when i execute following statement of constructor $this->paths is not showing the value of $paths variable. although data type of both are splpriorityque

$this->paths = isset($paths) ? $paths : $this->loadPaths();

first statement of render is render()

$path = $this->getPath($this->getLayout());

$path is returend with false value.

my main page shows error "Layout Path Not Found". Any solutions to that problem

UPDATE: LAST LINE paths is splpriorityque $abc=$paths; $this->paths=clone $paths

after these two statement $abc is showing correct value but $this->paths has missing or loastdata.in netbeans debugger

Was it helpful?

Solution

first i decided to delete this question because of very stupid mistake. but later i decided to remain as it is.

there was some setting problem or bug in netbeans, thats why it was unable to expand $this object member "splpriorityqueue".

$this->paths = isset($paths) ? $paths : $this->loadPaths();

above statement is perfectly correct.

and the error "layout path was not found" was beacause i named my tmpl folder as templ. which was causing realpath() function in

JPath::find() 

to not work properly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top