original_string: function get_background_position()
      {
          $tmp = explode(" ", $this->_props["background_position"]);
  
          switch ($tmp[0]) {
              case "left":
                  $x = "0%";
                  break;
  
              case "right":
                  $x = "100%";
                  break;
  
              case "top":
                  $y = "0%";
                  break;
  
              case "bottom":
                  $y = "100%";
                  break;
  
              case "center":
                  $x = "50%";
                  $y = "50%";
                  break;
  
              default:
                  $x = $tmp[0];
                  break;
          }
  
          if (isset($tmp[1])) {
              switch ($tmp[1]) {
                  case "left":
                      $x = "0%";
                      break;
  
                  case "right":
                      $x = "100%";
                      break;
  
                  case "top":
                      $y = "0%";
                      break;
  
                  case "bottom":
                      $y = "100%";
                      break;
  
                  case "center":
                      if ($tmp[0] === "left" || $tmp[0] === "right" || $tmp[0] === "center") {
                          $y = "50%";
                      } else {
                          $x = "50%";
                      }
                      break;
  
                  default:
                      $y = $tmp[1];
                      break;
              }
          } else {
              $y = "50%";
          }
  
          if (!isset($x)) {
              $x = "0%";
          }
  
          if (!isset($y)) {
              $y = "0%";
          }
  
          return array(
              0 => $x, "x" => $x,
              1 => $y, "y" => $y,
          );
      }
code: function get_background_position()
      {
          $tmp = explode(" ", $this->_props["background_position"]);
  
          switch ($tmp[0]) {
              case "left":
                  $x = "0%";
                  break;
  
              case "right":
                  $x = "100%";
                  break;
  
              case "top":
                  $y = "0%";
                  break;
  
              case "bottom":
                  $y = "100%";
                  break;
  
              case "center":
                  $x = "50%";
                  $y = "50%";
                  break;
  
              default:
                  $x = $tmp[0];
                  break;
          }
  
          if (isset($tmp[1])) {
              switch ($tmp[1]) {
                  case "left":
                      $x = "0%";
                      break;
  
                  case "right":
                      $x = "100%";
                      break;
  
                  case "top":
                      $y = "0%";
                      break;
  
                  case "bottom":
                      $y = "100%";
                      break;
  
                  case "center":
                      if ($tmp[0] === "left" || $tmp[0] === "right" || $tmp[0] === "center") {
                          $y = "50%";
                      } else {
                          $x = "50%";
                      }
                      break;
  
                  default:
                      $y = $tmp[1];
                      break;
              }
          } else {
              $y = "50%";
          }
  
          if (!isset($x)) {
              $x = "0%";
          }
  
          if (!isset($y)) {
              $y = "0%";
          }
  
          return array(
              0 => $x, "x" => $x,
              1 => $y, "y" => $y,
          );
      }
code_tokens: function get_background_position ( ) { $ tmp = explode ( " " , $ this -> _props [ "background_position" ] ) ; switch ( $ tmp [ 0 ] ) { case "left" : $ x = "0%" ; break ; case "right" : $ x = "100%" ; break ; case "top" : $ y = "0%" ; break ; case "bottom" : $ y = "100%" ; break ; case "center" : $ x = "50%" ; $ y = "50%" ; break ; default : $ x = $ tmp [ 0 ] ; break ; } if ( isset ( $ tmp [ 1 ] ) ) { switch ( $ tmp [ 1 ] ) { case "left" : $ x = "0%" ; break ; case "right" : $ x = "100%" ; break ; case "top" : $ y = "0%" ; break ; case "bottom" : $ y = "100%" ; break ; case "center" : if ( $ tmp [ 0 ] === "left" || $ tmp [ 0 ] === "right" || $ tmp [ 0 ] === "center" ) { $ y = "50%" ; } else { $ x = "50%" ; } break ; default : $ y = $ tmp [ 1 ] ; break ; } } else { $ y = "50%" ; } if ( ! isset ( $ x ) ) { $ x = "0%" ; } if ( ! isset ( $ y ) ) { $ y = "0%" ; } return array ( 0 => $ x , "x" => $ x , 1 => $ y , "y" => $ y , ) ; }
docstring: Returns the background position as an array
  
  The returned array has the following format:
  <code>array(x,y, "x" => x, "y" => y)</code>
  
  @link http://www.w3.org/TR/CSS21/colors.html#propdef-background-position
  @return array
docstring_tokens: Returns the background position as an array