Skip to content

Commit ce8b94a

Browse files
author
Alexander Paliarush
committed
MAGETWO-31931: Implement ExtensionInterface Code Generator
- Refactored usages of _getFullyQualifiedClassName
1 parent 65335ee commit ce8b94a

File tree

1 file changed

+2
-2
lines changed
  • lib/internal/Magento/Framework/ObjectManager/Code/Generator

1 file changed

+2
-2
lines changed

lib/internal/Magento/Framework/ObjectManager/Code/Generator/Persistor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ protected function _getSourceResourcePropertyName() // InvoiceResource
138138
*/
139139
protected function _getSourceResourceClassName() // Invoice\Resource
140140
{
141-
$temporary = str_replace('\\Api\\Data\\', '\\Model\\Spi', $this->_getSourceClassName());
142-
$parts = explode('\\', $temporary);
141+
$temporary = str_replace('\\Api\\Data\\', '\\Model\\Spi\\', $this->_getSourceClassName());
142+
$parts = explode('\\', ltrim($temporary, '\\'));
143143
$className = array_pop($parts);
144144
$className = str_replace('Interface', '', $className);
145145
return '\\' . implode('\\', $parts) . '\\' . $className . 'ResourceInterface';

0 commit comments

Comments
 (0)