public function requireModel($model, &$data, $prefix = null)
    {
        $class = null;
        $name = (null !== $prefix) ? $prefix : substr($model, strlen(explode('_', $model)[0]) + 7);
        
        foreach ($this->array_prefix as $k => $ap) {
            if (strrpos($ap, $name) === (strlen($ap) - strlen($name))) {
                unset($this->array_prefix[$k]);
                $class = clone $this->container->get($model);
                $class->setPrefix($prefix);
                $class->setArrayPrefix($this->array_prefix);
                $class->setParentModel($this);
                $class->exchangeArray($data);
                if (! $class->Keep()) {
                    return new IsNull();
                }
                break;
            }
        }
        
        return $class;
    }
public function requireModel($model, &$data, $prefix = null)
    {
        $class = null;
        $name = (null !== $prefix) ? $prefix : substr($model, strlen(explode('_', $model)[0]) + 7);
        
        foreach ($this->array_prefix as $k => $ap) {
            if (strrpos($ap, $name) === (strlen($ap) - strlen($name))) {
                unset($this->array_prefix[$k]);
                $class = clone $this->container->get($model);
                $class->setPrefix($prefix);
                $class->setArrayPrefix($this->array_prefix);
                $class->setParentModel($this);
                $class->exchangeArray($data);
                if (! $class->Keep()) {
                    return new IsNull();
                }
                break;
            }
        }
        
        return $class;
    }
public function requireModel ( $ model , & $ data , $ prefix = null ) { $ class = null ; $ name = ( null !== $ prefix ) ? $ prefix : substr ( $ model , strlen ( explode ( '_' , $ model ) [ 0 ] ) + 7 ) ; foreach ( $ this -> array_prefix as $ k => $ ap ) { if ( strrpos ( $ ap , $ name ) === ( strlen ( $ ap ) - strlen ( $ name ) ) ) { unset ( $ this -> array_prefix [ $ k ] ) ; $ class = clone $ this -> container -> get ( $ model ) ; $ class -> setPrefix ( $ prefix ) ; $ class -> setArrayPrefix ( $ this -> array_prefix ) ; $ class -> setParentModel ( $ this ) ; $ class -> exchangeArray ( $ data ) ; if ( ! $ class -> Keep ( ) ) { return new IsNull ( ) ; } break ; } } return $ class ; }
return Model if needed.

@param string $model
@param array $data
@param string $prefix

@return AbstractModel|null
return Model if needed .