Esempio n. 1
0
 /**
  * Returns the special URI segments.
  * If no key is passed, returns the first found special uri segments.
  *
  * Example : 	URI string : /my_page/archives/2012/08
  *				Returned segments :
  * 				array(2012, 08)
  *
  * @param 	string $key
  *
  * @return 	array|null
  *
  */
 public static function get_special_uri_segments($key = NULL)
 {
     if (!is_null($key)) {
         $index = self::get_special_uri_segment_index($key);
         $segments = array_slice(self::get_uri_segments(), $index + 1);
         return $segments;
     } else {
         if (is_null(self::$special_uri_segments)) {
             self::$special_uri_segments = array_slice(self::get_uri_segments(), self::get_special_uri_segment_index() + 1);
         }
         return self::$special_uri_segments;
     }
 }