src/Foxy/FoxyClient/FoxyClient.php
public function saveLinks($data)
    {
        if (isset($data['_links'])) {
            foreach ($data['_links'] as $rel => $link) {
                if (!in_array($rel, $this->registered_link_relations)
                    && $rel != 'curies'
                    && $rel.'/' != static::LINK_RELATIONSHIPS_BASE_URI) {
                    $this->links[$rel] = $link['href'];
                }
            }
        } else if (isset($data['links'])) {
            foreach ($data['links'] as $link) {
                foreach ($link['rel'] as $rel) {
                    if (!in_array($rel, $this->registered_link_relations)
                        && $rel.'/' != static::LINK_RELATIONSHIPS_BASE_URI) {
                        $this->links[$rel] = $link['href'];
                    }
                }
            }
        }
    }
public function saveLinks($data)
    {
        if (isset($data['_links'])) {
            foreach ($data['_links'] as $rel => $link) {
                if (!in_array($rel, $this->registered_link_relations)
                    && $rel != 'curies'
                    && $rel.'/' != static::LINK_RELATIONSHIPS_BASE_URI) {
                    $this->links[$rel] = $link['href'];
                }
            }
        } else if (isset($data['links'])) {
            foreach ($data['links'] as $link) {
                foreach ($link['rel'] as $rel) {
                    if (!in_array($rel, $this->registered_link_relations)
                        && $rel.'/' != static::LINK_RELATIONSHIPS_BASE_URI) {
                        $this->links[$rel] = $link['href'];
                    }
                }
            }
        }
    }
public function saveLinks ( $ data ) { if ( isset ( $ data [ '_links' ] ) ) { foreach ( $ data [ '_links' ] as $ rel => $ link ) { if ( ! in_array ( $ rel , $ this -> registered_link_relations ) && $ rel != 'curies' && $ rel . '/' != static :: LINK_RELATIONSHIPS_BASE_URI ) { $ this -> links [ $ rel ] = $ link [ 'href' ] ; } } } else if ( isset ( $ data [ 'links' ] ) ) { foreach ( $ data [ 'links' ] as $ link ) { foreach ( $ link [ 'rel' ] as $ rel ) { if ( ! in_array ( $ rel , $ this -> registered_link_relations ) && $ rel . '/' != static :: LINK_RELATIONSHIPS_BASE_URI ) { $ this -> links [ $ rel ] = $ link [ 'href' ] ; } } } } }
Save Links to the Object For Easy Retrieval Later
Save Links to the Object For Easy Retrieval Later