src/Repositories/LinkTypeRepository.php
/**
     * Return's an array with all available link types with the link type code as key.
     *
     * @return array The available link types
     */
Return's an array with all available link types with the link type code as key.
@return array The available link types
Return ' s an array with all available link types with the link type code as key . @return array The available link types
public function findAll()
    {
        if (!isset($this->cache[__METHOD__])) {
            $this->linkTypeStmt->execute();
            $linkTypes = array();
            $availableLinkTypes = $this->linkTypeStmt->fetchAll(\PDO::FETCH_ASSOC);
            foreach ($availableLinkTypes as $linkType) {
                $linkTypes[$linkType[MemberNames::CODE]] = $linkType;
            }
            $this->cache[__METHOD__] = $linkTypes;
        }
        return $this->cache[__METHOD__];
    }
public function findAll ( ) { if ( ! isset ( $ this -> cache [ __METHOD__ ] ) ) { $ this -> linkTypeStmt -> execute ( ) ; $ linkTypes = array ( ) ; $ availableLinkTypes = $ this -> linkTypeStmt -> fetchAll ( \ PDO :: FETCH_ASSOC ) ; foreach ( $ availableLinkTypes as $ linkType ) { $ linkTypes [ $ linkType [ MemberNames :: CODE ] ] = $ linkType ; } $ this -> cache [ __METHOD__ ] = $ linkTypes ; } return $ this -> cache [ __METHOD__ ] ; }
Return's an array with all available link types with the link type code as key.
Return ' s an array with all available link types with the link type code as key .
// query whether or not we've already loaded the value // try to load the link types // initialize the array for the link types // load the available link types // prepare the link types => we need the code as key // append the link types to the cache // return the link types from the cache