protected function load($field)
    {
        if (!is_null($this->$field)
            || !$this->delegatesCollection
            || !$this->delegatesCollection->containsKey($key = strtolower($field))
        ) {
            return $this->$field;
        }

        $loader = $this->delegatesCollection->get($key);
        $this->delegatesCollection->remove($key);

        return $this->$field = $loader($this);
    }
protected function load($field)
    {
        if (!is_null($this->$field)
            || !$this->delegatesCollection
            || !$this->delegatesCollection->containsKey($key = strtolower($field))
        ) {
            return $this->$field;
        }

        $loader = $this->delegatesCollection->get($key);
        $this->delegatesCollection->remove($key);

        return $this->$field = $loader($this);
    }
protected function load ( $ field ) { if ( ! is_null ( $ this -> $ field ) || ! $ this -> delegatesCollection || ! $ this -> delegatesCollection -> containsKey ( $ key = strtolower ( $ field ) ) ) { return $ this -> $ field ; } $ loader = $ this -> delegatesCollection -> get ( $ key ) ; $ this -> delegatesCollection -> remove ( $ key ) ; return $ this -> $ field = $ loader ( $ this ) ; }
Load given field if able to, define his value and return it.

@example
public function getRelatedEntity()
{
return $this->load('relatedEntity');
}

@param string $field

@return mixed|null field value if retrieved
Load given field if able to define his value and return it .