public function contributeToClass($propertyName, $classObject)
    {
        //        $classObject-> = $this;
        ClassHelper::setAttributes($classObject, [$propertyName => $this]);

        $modelClass = $this->modelClassInfo($classObject);
        $this->modelName = $modelClass->getShortName();
        $this->modelNamespace = $modelClass->getNamespaceName();
        $this->namspacedModelName = $modelClass->getName();

        $this->scopeModel = $classObject;

        // override with the configs now.
        foreach (static::$DEFAULT_NAMES as $defaultName) {
            if (ArrayHelper::hasKey($this->overrides, $defaultName)) {
                $this->{$defaultName} = $this->overrides[$defaultName];
            }
        }

        if (null == $this->getDbTable()) {
            $this->setDbTable($this->getTableName());
        }

        $vName = $this->verboseName;

        $this->verboseName = (empty($vName)) ? ucwords(StringHelper::camelToSpace($this->modelName)) : $vName;
    }
public function contributeToClass($propertyName, $classObject)
    {
        //        $classObject-> = $this;
        ClassHelper::setAttributes($classObject, [$propertyName => $this]);

        $modelClass = $this->modelClassInfo($classObject);
        $this->modelName = $modelClass->getShortName();
        $this->modelNamespace = $modelClass->getNamespaceName();
        $this->namspacedModelName = $modelClass->getName();

        $this->scopeModel = $classObject;

        // override with the configs now.
        foreach (static::$DEFAULT_NAMES as $defaultName) {
            if (ArrayHelper::hasKey($this->overrides, $defaultName)) {
                $this->{$defaultName} = $this->overrides[$defaultName];
            }
        }

        if (null == $this->getDbTable()) {
            $this->setDbTable($this->getTableName());
        }

        $vName = $this->verboseName;

        $this->verboseName = (empty($vName)) ? ucwords(StringHelper::camelToSpace($this->modelName)) : $vName;
    }
public function contributeToClass ( $ propertyName , $ classObject ) { //        $classObject-> = $this; ClassHelper :: setAttributes ( $ classObject , [ $ propertyName => $ this ] ) ; $ modelClass = $ this -> modelClassInfo ( $ classObject ) ; $ this -> modelName = $ modelClass -> getShortName ( ) ; $ this -> modelNamespace = $ modelClass -> getNamespaceName ( ) ; $ this -> namspacedModelName = $ modelClass -> getName ( ) ; $ this -> scopeModel = $ classObject ; // override with the configs now. foreach ( static :: $ DEFAULT_NAMES as $ defaultName ) { if ( ArrayHelper :: hasKey ( $ this -> overrides , $ defaultName ) ) { $ this -> { $ defaultName } = $ this -> overrides [ $ defaultName ] ; } } if ( null == $ this -> getDbTable ( ) ) { $ this -> setDbTable ( $ this -> getTableName ( ) ) ; } $ vName = $ this -> verboseName ; $ this -> verboseName = ( empty ( $ vName ) ) ? ucwords ( StringHelper :: camelToSpace ( $ this -> modelName ) ) : $ vName ; }
Add the current object to the passed in object.

@param string $propertyName the name map the current object to, in the class object passed in
@param Model  $classObject  the object to attach the current object to

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
Add the current object to the passed in object .