|
@@ 295-322 (lines=28) @@
|
| 292 |
|
if ( $template instanceof ar_listExpression_Pattern ) { |
| 293 |
|
$template = ar::listExpression( $this->count() )->pattern( $template ); |
| 294 |
|
} |
| 295 |
|
if ( ar_store::$rememberShortcuts) { |
| 296 |
|
$path = ar_store::makePath( $this->path ); |
| 297 |
|
$realpath = ar_store::makeRealPath( $this->path ); |
| 298 |
|
if ($realpath != $path ) { |
| 299 |
|
// must do a call for each seperate path. |
| 300 |
|
$list = array(); |
| 301 |
|
$parent = $path; |
| 302 |
|
while ( $realpath != $this->top && $parent != $this->top && end( $list ) != $realpath ) { |
| 303 |
|
$list[$parent] = $realpath; |
| 304 |
|
$parent = ar_store::makePath( $parent . '../' ); |
| 305 |
|
$realpath = ar_store::makeRealPath( $parent ); |
| 306 |
|
} |
| 307 |
|
if ( ( $realpath == $this->top ) || ( $parent == $this->top ) ) { |
| 308 |
|
$list[$parent] = $realpath; |
| 309 |
|
} |
| 310 |
|
$list = array_reverse( $list ); |
| 311 |
|
$result = array(); |
| 312 |
|
foreach ( $list as $virtualpath => $path ) { |
| 313 |
|
$result[$virtualpath] = current( $store->call( $template, $args, |
| 314 |
|
$store->get( $path ), |
| 315 |
|
array( |
| 316 |
|
'usePathAsKey' => true |
| 317 |
|
) |
| 318 |
|
) ); |
| 319 |
|
} |
| 320 |
|
return $result; |
| 321 |
|
} |
| 322 |
|
} |
| 323 |
|
return $store->call( $template, $args, |
| 324 |
|
$store->parents( $this->path, $this->top ), |
| 325 |
|
array( 'usePathAsKey' => true ) |
|
@@ 332-356 (lines=25) @@
|
| 329 |
|
public function info(){ |
| 330 |
|
global $store; |
| 331 |
|
|
| 332 |
|
if ( ar_store::$rememberShortcuts) { |
| 333 |
|
$path = ar_store::makePath( $this->path ); |
| 334 |
|
$realpath = ar_store::makeRealPath( $this->path ); |
| 335 |
|
if ($realpath != $path ) { |
| 336 |
|
// must do a call for each seperate path. |
| 337 |
|
$list = array(); |
| 338 |
|
$parent = $path; |
| 339 |
|
while ( $realpath != $this->top && $parent != $this->top && end( $list ) != $realpath ) { |
| 340 |
|
$list[$parent] = $realpath; |
| 341 |
|
$parent = ar_store::makePath( $parent . '../' ); |
| 342 |
|
$realpath = ar_store::makeRealPath( $parent ); |
| 343 |
|
} |
| 344 |
|
if ( ( $realpath == $this->top ) || ( $parent == $this->top ) ) { |
| 345 |
|
$list[$parent] = $realpath; |
| 346 |
|
} |
| 347 |
|
$list = array_reverse( $list ); |
| 348 |
|
$result = array(); |
| 349 |
|
foreach ( $list as $virtualpath => $path ) { |
| 350 |
|
$result[$virtualpath] = current( $store->info( |
| 351 |
|
$store->get( $path ) |
| 352 |
|
)); |
| 353 |
|
} |
| 354 |
|
return $result; |
| 355 |
|
} |
| 356 |
|
} |
| 357 |
|
|
| 358 |
|
return $store->info( |
| 359 |
|
$store->parents( $this->path, $this->top ), array( 'usePathAsKey' => true ) |