Overview

Namespaces

  • Inlm
    • Mappers

Classes

  • Inlm\Mappers\CamelCaseMapper
  • Inlm\Mappers\DefaultMapper
  • Inlm\Mappers\DynamicMapper
  • Inlm\Mappers\UnderScoreMapper

Exceptions

  • Inlm\Mappers\DuplicateException
  • Inlm\Mappers\Exception
  • Inlm\Mappers\InvalidArgumentException
  • Overview
  • Namespace
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 
<?php

    namespace Inlm\Mappers;


    class CamelCaseMapper extends DefaultMapper
    {
        /**
         * @inheritdoc
         */
        public function getTable($entityClass)
        {
            return lcfirst($this->trimNamespace($entityClass));
        }



        /**
         * @inheritdoc
         */
        public function getTableByRepositoryClass($repositoryClass)
        {
            $matches = array();

            if (preg_match('#([a-z0-9]+)repository$#i', $repositoryClass, $matches)) {
                return lcfirst($matches[1]);
            }

            throw new InvalidArgumentException('Cannot determine table name.');
        }
    }
inlm/mappers v1.0.0 API documentation API documentation generated by ApiGen