/** * Sets the current state * * @param object * @return void */ public function setState($state) { $fqn = $this->_fully_qualified_namespace; $newState = is_string($state) ? ObjectResolverSingleton::make("{$fqn}\\{$state}", $this) : $state; $newState = $newState ?: ObjectResolverSingleton::make("{$state}", $this); $newState = $newState ?: $state; $this->_state = $newState; }