public function getArrayCopy($keyColumn = null, $usePrefix = false)
    {
        if (null === $keyColumn && false === $usePrefix) {
            return parent::getArrayCopy();
        }
        $ret = array();
        $keyGetterMethod = 'get' . $keyColumn;
        foreach ($this as $key => $obj) {
            $key = null === $keyColumn ? $key : $obj->$keyGetterMethod();
            $key = $usePrefix ? ($this->getModel() . '_' . $key) : $key;
            $ret[$key] = $obj;
        }

        return $ret;
    }
public function getArrayCopy($keyColumn = null, $usePrefix = false)
    {
        if (null === $keyColumn && false === $usePrefix) {
            return parent::getArrayCopy();
        }
        $ret = array();
        $keyGetterMethod = 'get' . $keyColumn;
        foreach ($this as $key => $obj) {
            $key = null === $keyColumn ? $key : $obj->$keyGetterMethod();
            $key = $usePrefix ? ($this->getModel() . '_' . $key) : $key;
            $ret[$key] = $obj;
        }

        return $ret;
    }
public function getArrayCopy ( $ keyColumn = null , $ usePrefix = false ) { if ( null === $ keyColumn && false === $ usePrefix ) { return parent :: getArrayCopy ( ) ; } $ ret = array ( ) ; $ keyGetterMethod = 'get' . $ keyColumn ; foreach ( $ this as $ key => $ obj ) { $ key = null === $ keyColumn ? $ key : $ obj -> $ keyGetterMethod ( ) ; $ key = $ usePrefix ? ( $ this -> getModel ( ) . '_' . $ key ) : $ key ; $ ret [ $ key ] = $ obj ; } return $ ret ; }
Get an array representation of the collection

@param string $keyColumn If null, the returned array uses an incremental index.
Otherwise, the array is indexed using the specified column
@param boolean $usePrefix If true, the returned array prefixes keys
with the model class name ('Article_0', 'Article_1', etc).

<code>
$bookCollection->getArrayCopy();
array(
0 => $book0,
1 => $book1,
)
$bookCollection->getArrayCopy('Id');
array(
123 => $book0,
456 => $book1,
)
$bookCollection->getArrayCopy(null, true);
array(
'Book_0' => $book0,
'Book_1' => $book1,
)
</code>

@return array
Get an array representation of the collection