src/snac/data/Resource.php
/**
     * Returns this object's data as an associative array
     *
     * @param boolean $shorten optional Whether or not to include null/empty components
     * @return string[][] This objects data in array form
     */
Returns this object's data as an associative array
@param boolean $shorten optional Whether or not to include null/empty components
@return string[][] This objects data in array form
Returns this object ' s data as an associative array @param boolean $shorten optional Whether or not to include null / empty components @return string [] [] This objects data in array form
public function toArray($shorten = true) {
        $return = array(
            "dataType" => "Resource",
            "documentType" => $this->documentType == null ? null : $this->documentType->toArray($shorten),
            "linkType" => $this->linkType == null ? null : $this->linkType->toArray($shorten),
            "entryType" => $this->entryType == null ? null : $this->entryType->toArray($shorten),
            "link" => $this->link,
            "source" => $this->source,
            "title" => $this->title,
            "abstract" => $this->abstract,
            "extent" => $this->extent,
            "date" => $this->date,
            "displayEntry" => $this->displayEntry,
            "originationNames" => array(),
            "languages" => array(),
            "repository" => $this->repository == null ? null : $this->repository->toArray($shorten)
        );
        foreach ($this->originationNames as $vv) {
            array_push($return['originationNames'], $vv->toArray($shorten));
        }
        foreach ($this->languages as $i => $v)
            $return["languages"][$i] = $v->toArray($shorten);
        $return = array_merge($return, parent::toArray($shorten));
        if ($shorten) {
            $return2 = array();
            foreach ($return as $i => $v)
                if ($v != null && !empty($v))
                    $return2[$i] = $v;
            unset($return);
            $return = $return2;
        }
        return $return;
    }
public function toArray ( $ shorten = true ) { $ return = array ( " dataType " => " Resource " , " documentType " => $ this -> documentType == null ? null : $ this -> documentType -> toArray ( $ shorten ) , " linkType " => $ this -> linkType == null ? null : $ this -> linkType -> toArray ( $ shorten ) , " entryType " => $ this -> entryType == null ? null : $ this -> entryType -> toArray ( $ shorten ) , " link " => $ this -> link , " source " => $ this -> source , " title " => $ this -> title , " abstract " => $ this -> abstract , " extent " => $ this -> extent , " date " => $ this -> date , " displayEntry " => $ this -> displayEntry , " originationNames " => array ( ) , " languages " => array ( ) , " repository " => $ this -> repository == null ? null : $ this -> repository -> toArray ( $ shorten ) ) ; foreach ( $ this -> originationNames as $ vv ) { array_push ( $ return [ 'originationNames' ] , $ vv -> toArray ( $ shorten ) ) ; } foreach ( $ this -> languages as $ i => $ v ) $ return [ " languages " ] [ $ i ] = $ v -> toArray ( $ shorten ) ; $ return = array_merge ( $ return , parent :: toArray ( $ shorten ) ) ; if ( $ shorten ) { $ return2 = array ( ) ; foreach ( $ return as $ i => $ v ) if ( $ v != null && ! empty ( $ v ) ) $ return2 [ $ i ] = $ v ; unset ( $ return ) ; $ return = $ return2 ; } return $ return ; }
Returns this object's data as an associative array
 @param boolean $shorten optional Whether or not to include null/empty components
 @return string[][] This objects data in array form
Returns this object ' s data as an associative array @param boolean $shorten optional Whether or not to include null / empty components @return string [] [] This objects data in array form
// Shorten if necessary