public function toMicro()
    {
        $inner = $this->getAttribute("amount", false); //cast=false
        $decimals = $this->getDivisibility();

        if (is_integer($inner)) {
            $attrib = $inner;
        }
        elseif (is_float($inner)) {
            // we want only integer!
            $attrib = $inner * pow(10, $decimals);
        }
        elseif (is_string($inner)) {
            // parse number string representation. Parsing to float.
            $isFloat = false !== strpos($inner, ".");
            $number = $isFloat ? (float) $inner : (int) $inner;
            $multi  = $isFloat ? pow(10, $decimals) : 1;
            $attrib = $number * $multi;
        }
        elseif (is_array($inner)) {
            // try to read first value of array
            $attrib = array_shift($inner);
        }
        else {
            $attrib = (int) $inner;
        }

        $this->micro = (int) $attrib;
        if ($this->micro < 0)
            // not allowed: 0 in micro XEM is the minimum possible value!
            $this->micro = 0;

        return $this->micro;
    }