/**
  * Loads php files containing classes or interfaces found in the classes directory of
  * an extension.
  *
  * @param string $className: Name of the class/interface to load
  * @uses t3lib_extMgm::extPath()
  * @return void
  */
 public static function loadClass($className)
 {
     $classNameParts = explode('_', $className, 3);
     $extensionKey = Tx_Extbase_Utility_Extension::convertCamelCaseToLowerCaseUnderscored($classNameParts[1]);
     if (t3lib_extMgm::isLoaded($extensionKey)) {
         $classFilePathAndName = t3lib_extMgm::extPath($extensionKey) . 'Classes/' . strtr($classNameParts[2], '_', '/') . '.php';
         if (file_exists($classFilePathAndName)) {
             require_once $classFilePathAndName;
         }
     }
 }
Esempio n. 2
0
 /**
  * Returns the extension name of the specified controller.
  *
  * @return string The extension key
  * @api
  */
 public function getControllerExtensionKey()
 {
     return Tx_Extbase_Utility_Extension::convertCamelCaseToLowerCaseUnderscored($this->controllerExtensionName);
 }
 /**
  * Returns the column name for a given property name of the specified class.
  *
  * @param string $className
  * @param string $propertyName
  * @return string The column name
  */
 public function convertPropertyNameToColumnName($propertyName, $className = NULL)
 {
     if (!empty($className)) {
         $dataMap = $this->getDataMap($className);
         if ($dataMap !== NULL) {
             $columnMap = $dataMap->getColumnMap($propertyName);
             if ($columnMap !== NULL) {
                 return $columnMap->getColumnName();
             }
         }
     }
     return Tx_Extbase_Utility_Extension::convertCamelCaseToLowerCaseUnderscored($propertyName);
 }
Esempio n. 4
0
 /**
  * Get the loweredcased extension's name this controller belongs to.
  *
  * @return string The lowercased underscored extension name.
  * @author Romain Ruetschi <*****@*****.**>
  */
 protected function getLowerCasedExtensionName()
 {
     if (!$this->lowerCasedExtensionName) {
         $this->lowerCasedExtensionName = Tx_Extbase_Utility_Extension::convertCamelCaseToLowerCaseUnderscored($this->request->getControllerExtensionName());
     }
     return $this->lowerCasedExtensionName;
 }