public function getIdentifier($generate = true){
        if(empty($this->identifier) && $generate){
            //try generating an identifier
            $relatedItem = $this->getRelatedItem();
            if(!is_null($relatedItem)){
                $this->identifier = $this->generateIdentifier();
            }
        }
        return (string) $this->identifier;
    }
public function getIdentifier($generate = true){
        if(empty($this->identifier) && $generate){
            //try generating an identifier
            $relatedItem = $this->getRelatedItem();
            if(!is_null($relatedItem)){
                $this->identifier = $this->generateIdentifier();
            }
        }
        return (string) $this->identifier;
    }
public function getIdentifier ( $ generate = true ) { if ( empty ( $ this -> identifier ) && $ generate ) { //try generating an identifier $ relatedItem = $ this -> getRelatedItem ( ) ; if ( ! is_null ( $ relatedItem ) ) { $ this -> identifier = $ this -> generateIdentifier ( ) ; } } return ( string ) $ this -> identifier ; }
get the identifier

@access public
@author Sam, <sam@taotesting.com>
@return string
get the identifier