public function defaults($key = null)
    {
        if (is_string($key)) {
            if (!$this->has($key)) {
                throw new Exception(sprintf(Exception::STATS_KEY_NOT_EXISTS, $key));
            }

            return $this->defaults->offsetGet($key);
        }

        return $this->defaults->toArray();
    }
public function defaults($key = null)
    {
        if (is_string($key)) {
            if (!$this->has($key)) {
                throw new Exception(sprintf(Exception::STATS_KEY_NOT_EXISTS, $key));
            }

            return $this->defaults->offsetGet($key);
        }

        return $this->defaults->toArray();
    }
public function defaults ( $ key = null ) { if ( is_string ( $ key ) ) { if ( ! $ this -> has ( $ key ) ) { throw new Exception ( sprintf ( Exception :: STATS_KEY_NOT_EXISTS , $ key ) ) ; } return $ this -> defaults -> offsetGet ( $ key ) ; } return $ this -> defaults -> toArray ( ) ; }
Get defaults stats.

@param string|null $key A setting key (optional)

@return array

@throws \Subbly\Api\Service\Exception

@api
Get defaults stats .