public function newInstance($cloned = array())
    {
        if ($cloned instanceof Model) {
            $cloned = $cloned->toArray(Model::FETCH_PUBLISHED);
        }

        if (isset($this->options['model'])) {
            $Model = $this->options['model'];
            return new $Model($cloned, array('collection' => $this));
        } else {
            return new Model($cloned, array('collection' => $this));
        }
    }
public function newInstance($cloned = array())
    {
        if ($cloned instanceof Model) {
            $cloned = $cloned->toArray(Model::FETCH_PUBLISHED);
        }

        if (isset($this->options['model'])) {
            $Model = $this->options['model'];
            return new $Model($cloned, array('collection' => $this));
        } else {
            return new Model($cloned, array('collection' => $this));
        }
    }
public function newInstance ( $ cloned = array ( ) ) { if ( $ cloned instanceof Model ) { $ cloned = $ cloned -> toArray ( Model :: FETCH_PUBLISHED ) ; } if ( isset ( $ this -> options [ 'model' ] ) ) { $ Model = $ this -> options [ 'model' ] ; return new $ Model ( $ cloned , array ( 'collection' => $ this ) ) ; } else { return new Model ( $ cloned , array ( 'collection' => $ this ) ) ; } }
Create new instance of model

@param array|\Norm\Model $cloned Model to clone

@return \Norm\Model
Create new instance of model