private function prependOrderEntry($path, $prependedPath)
    {
        $lastEntry = reset($this->json['_order'][$path]);

        if ($prependedPath === $lastEntry['path']) {
            // If the first entry matches the new one, add the reference
            // of the current resource to the limit
            ++$lastEntry['references'];
        } else {
            array_unshift($this->json['_order'][$path], array(
                'path' => $prependedPath,
                'references' => 1,
            ));
        }
    }
private function prependOrderEntry($path, $prependedPath)
    {
        $lastEntry = reset($this->json['_order'][$path]);

        if ($prependedPath === $lastEntry['path']) {
            // If the first entry matches the new one, add the reference
            // of the current resource to the limit
            ++$lastEntry['references'];
        } else {
            array_unshift($this->json['_order'][$path], array(
                'path' => $prependedPath,
                'references' => 1,
            ));
        }
    }
private function prependOrderEntry ( $ path , $ prependedPath ) { $ lastEntry = reset ( $ this -> json [ '_order' ] [ $ path ] ) ; if ( $ prependedPath === $ lastEntry [ 'path' ] ) { // If the first entry matches the new one, add the reference // of the current resource to the limit ++ $ lastEntry [ 'references' ] ; } else { array_unshift ( $ this -> json [ '_order' ] [ $ path ] , array ( 'path' => $ prependedPath , 'references' => 1 , ) ) ; } }
Inserts a path at the beginning of the order list of a mapped path.

@param string $path          The path of the mapping where to prepend.
@param string $prependedPath The path of the mapping to prepend.
Inserts a path at the beginning of the order list of a mapped path .