You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by bh...@apache.org on 2011/10/28 01:20:49 UTC

svn commit: r1190083 [5/5] - in /shindig/branches/php_namespace_refactoring/php/src/apache: ./ shindig/ shindig/common/ shindig/common/sample/ shindig/gadgets/ shindig/gadgets/oauth/ shindig/gadgets/render/ shindig/gadgets/rewrite/ shindig/gadgets/samp...

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Address.php (from r1186446, shindig/trunk/php/src/social/model/Address.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Address.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Address.php&p1=shindig/trunk/php/src/social/model/Address.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Address.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Address.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Album.php (from r1186446, shindig/trunk/php/src/social/model/Album.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Album.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Album.php&p1=shindig/trunk/php/src/social/model/Album.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Album.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Album.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -108,7 +110,7 @@ class Album {
   
   public function setMediaType($mediaType) {
     if (!in_array($mediaType, MediaItem::$TYPES)) {
-      throw new Exception("Invalid Media type");
+      throw new \Exception("Invalid Media type");
     }
     $this->mediaType = $mediaType;
   }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ApiCollection.php (from r1186446, shindig/trunk/php/src/social/model/ApiCollection.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ApiCollection.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ApiCollection.php&p1=shindig/trunk/php/src/social/model/ApiCollection.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/ApiCollection.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ApiCollection.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/BodyType.php (from r1186446, shindig/trunk/php/src/social/model/BodyType.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/BodyType.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/BodyType.php&p1=shindig/trunk/php/src/social/model/BodyType.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/BodyType.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/BodyType.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ComplexField.php (from r1186446, shindig/trunk/php/src/social/model/ComplexField.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ComplexField.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ComplexField.php&p1=shindig/trunk/php/src/social/model/ComplexField.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/ComplexField.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ComplexField.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Email.php (from r1186446, shindig/trunk/php/src/social/model/Email.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Email.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Email.php&p1=shindig/trunk/php/src/social/model/Email.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Email.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Email.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Enum.php (from r1186446, shindig/trunk/php/src/social/model/Enum.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Enum.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Enum.php&p1=shindig/trunk/php/src/social/model/Enum.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Enum.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Enum.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -39,7 +41,7 @@ abstract class Enum implements ComplexFi
         $key = array_search($key, $this->values);
       } else {
         $this->displayValue = $displayValue;
-        //throw new Exception("Invalid Enum key: $key\n". print_r(debug_backtrace(), true));
+        //throw new \Exception("Invalid Enum key: $key\n". print_r(debug_backtrace(), true));
       }
     }
     $this->key = $key;
@@ -63,45 +65,3 @@ abstract class Enum implements ComplexFi
     return $this->key;
   }
 }
-
-/**
- * public Enum for opensocial.Enum.Drinker
- */
-class EnumDrinker extends Enum {
-  public $values = array('HEAVILY' => "Heavily", 'NO' => "No", 'OCCASIONALLY' => "Occasionally",
-      'QUIT' => "Quit", 'QUITTING' => "Quitting", 'REGULARLY' => "Regularly",
-      'SOCIALLY' => "Socially", 'YES' => "Yes");
-}
-
-/**
- * public Enum for opensocial.Enum.Gender
- */
-class EnumGender extends Enum {
-  public $values = array('FEMALE' => "Female", 'MALE' => "Male");
-}
-
-/**
- * public Enum for opensocial.Enum.LookingFor
- */
-class EnumLookingFor extends Enum {
-  public $values = array('ACTIVITY_PARTNERS' => 'Activity Partners', 'DATING' => 'Dating',
-      'FRIENDS' => 'Friends', 'NETWORKING' => 'Networking', 'RANDOM' => 'Random',
-      'RELATIONSHIP' => 'Relationship');
-}
-
-/**
- * public Enum for opensocial.Enum.Smoker
- */
-class EnumSmoker extends Enum {
-  public $values = array('HEAVILY' => "Heavily", 'NO' => "No", 'OCCASIONALLY' => "Ocasionally", 'QUIT' => "Quit",
-      'QUITTING' => "Quitting", 'REGULARLY' => "Regularly", 'SOCIALLY' => "Socially",
-      'YES' => "Yes");
-}
-
-/**
- * public Enum for opensocial.Enum.Presence
- */
-class EnumPresence extends Enum {
-  public $values = array('AWAY' => "Away", 'CHAT' => "Chat", 'DND' => "Do Not Disturb", 'OFFLINE' => "Offline",
-      'ONLINE' => "Online", 'XA' => "Extended Away");
-}

Added: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumDrinker.php
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumDrinker.php?rev=1190083&view=auto
==============================================================================
--- shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumDrinker.php (added)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumDrinker.php Thu Oct 27 23:20:41 2011
@@ -0,0 +1,30 @@
+<?php
+namespace apache\shindig\social\model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * public Enum for opensocial.Enum.Drinker
+ */
+class EnumDrinker extends Enum {
+  public $values = array('HEAVILY' => "Heavily", 'NO' => "No", 'OCCASIONALLY' => "Occasionally",
+      'QUIT' => "Quit", 'QUITTING' => "Quitting", 'REGULARLY' => "Regularly",
+      'SOCIALLY' => "Socially", 'YES' => "Yes");
+}

Propchange: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumDrinker.php
------------------------------------------------------------------------------
    svn:keywords = Id

Added: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumGender.php
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumGender.php?rev=1190083&view=auto
==============================================================================
--- shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumGender.php (added)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumGender.php Thu Oct 27 23:20:41 2011
@@ -0,0 +1,28 @@
+<?php
+namespace apache\shindig\social\model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * public Enum for opensocial.Enum.Gender
+ */
+class EnumGender extends Enum {
+  public $values = array('FEMALE' => "Female", 'MALE' => "Male");
+}
\ No newline at end of file

Propchange: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumGender.php
------------------------------------------------------------------------------
    svn:keywords = Id

Added: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumLookingFor.php
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumLookingFor.php?rev=1190083&view=auto
==============================================================================
--- shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumLookingFor.php (added)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumLookingFor.php Thu Oct 27 23:20:41 2011
@@ -0,0 +1,30 @@
+<?php
+namespace apache\shindig\social\model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * public Enum for opensocial.Enum.LookingFor
+ */
+class EnumLookingFor extends Enum {
+  public $values = array('ACTIVITY_PARTNERS' => 'Activity Partners', 'DATING' => 'Dating',
+      'FRIENDS' => 'Friends', 'NETWORKING' => 'Networking', 'RANDOM' => 'Random',
+      'RELATIONSHIP' => 'Relationship');
+}

Propchange: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumLookingFor.php
------------------------------------------------------------------------------
    svn:keywords = Id

Added: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumPresence.php
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumPresence.php?rev=1190083&view=auto
==============================================================================
--- shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumPresence.php (added)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumPresence.php Thu Oct 27 23:20:41 2011
@@ -0,0 +1,29 @@
+<?php
+namespace apache\shindig\social\model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * public Enum for opensocial.Enum.Presence
+ */
+class EnumPresence extends Enum {
+  public $values = array('AWAY' => "Away", 'CHAT' => "Chat", 'DND' => "Do Not Disturb", 'OFFLINE' => "Offline",
+      'ONLINE' => "Online", 'XA' => "Extended Away");
+}

Propchange: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumPresence.php
------------------------------------------------------------------------------
    svn:keywords = Id

Added: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumSmoker.php
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumSmoker.php?rev=1190083&view=auto
==============================================================================
--- shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumSmoker.php (added)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumSmoker.php Thu Oct 27 23:20:41 2011
@@ -0,0 +1,30 @@
+<?php
+namespace apache\shindig\social\model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * public Enum for opensocial.Enum.Smoker
+ */
+class EnumSmoker extends Enum {
+  public $values = array('HEAVILY' => "Heavily", 'NO' => "No", 'OCCASIONALLY' => "Ocasionally", 'QUIT' => "Quit",
+      'QUITTING' => "Quitting", 'REGULARLY' => "Regularly", 'SOCIALLY' => "Socially",
+      'YES' => "Yes");
+}

Propchange: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/EnumSmoker.php
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/IdSpec.php (from r1186446, shindig/trunk/php/src/social/model/IdSpec.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/IdSpec.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/IdSpec.php&p1=shindig/trunk/php/src/social/model/IdSpec.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/IdSpec.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/IdSpec.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -20,7 +22,7 @@
 
 class IdSpec {
   public static $types = array('VIEWER', 'OWNER', 'VIEWER_FRIENDS', 'OWNER_FRIENDS', 'USER_IDS');
-  
+
   public $jsonSpec;
   public $type;
 
@@ -30,12 +32,12 @@ class IdSpec {
   }
 
   static public function fromJson($jsonIdSpec) {
-    if (! empty($jsonIdSpec) && in_array((string)$jsonIdSpec, idSpec::$types)) {
+    if (! empty($jsonIdSpec) && in_array((string)$jsonIdSpec, self::$types)) {
       $idSpecEnum = (string)$jsonIdSpec;
     } elseif (! empty($jsonIdSpec)) {
       $idSpecEnum = 'USER_IDS';
     } else {
-      throw new Exception("The json request had a bad idSpec");
+      throw new \Exception("The json request had a bad idSpec");
     }
     return new IdSpec($jsonIdSpec, $idSpecEnum);
   }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Im.php (from r1186446, shindig/trunk/php/src/social/model/Im.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Im.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Im.php&p1=shindig/trunk/php/src/social/model/Im.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Im.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Im.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ListField.php (from r1186446, shindig/trunk/php/src/social/model/ListField.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ListField.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ListField.php&p1=shindig/trunk/php/src/social/model/ListField.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/ListField.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/ListField.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/MediaItem.php (from r1186446, shindig/trunk/php/src/social/model/MediaItem.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/MediaItem.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/MediaItem.php&p1=shindig/trunk/php/src/social/model/MediaItem.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/MediaItem.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/MediaItem.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -211,7 +213,7 @@ class MediaItem {
 
   public function setType($type) {
     if (! in_array($type, self::$TYPES)) {
-      throw new Exception("Invalid Media type");
+      throw new \Exception("Invalid Media type");
     }
     $this->type = $type;
   }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Message.php (from r1186446, shindig/trunk/php/src/social/model/Message.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Message.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Message.php&p1=shindig/trunk/php/src/social/model/Message.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Message.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Message.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/MessageCollection.php (from r1186446, shindig/trunk/php/src/social/model/MessageCollection.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/MessageCollection.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/MessageCollection.php&p1=shindig/trunk/php/src/social/model/MessageCollection.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/MessageCollection.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/MessageCollection.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Name.php (from r1186446, shindig/trunk/php/src/social/model/Name.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Name.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Name.php&p1=shindig/trunk/php/src/social/model/Name.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Name.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Name.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Organization.php (from r1186446, shindig/trunk/php/src/social/model/Organization.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Organization.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Organization.php&p1=shindig/trunk/php/src/social/model/Organization.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Organization.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Organization.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Person.php (from r1186446, shindig/trunk/php/src/social/model/Person.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Person.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Person.php&p1=shindig/trunk/php/src/social/model/Person.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Person.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Person.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -18,10 +20,6 @@
  * under the License.
  */
 
-if (! class_exists('Enum')) {
-  require 'Enum.php';
-}
-
 /**
  * see
  * http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/opensocial-reference#opensocial.Person

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Phone.php (from r1186446, shindig/trunk/php/src/social/model/Phone.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Phone.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Phone.php&p1=shindig/trunk/php/src/social/model/Phone.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Phone.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Phone.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Photo.php (from r1186446, shindig/trunk/php/src/social/model/Photo.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Photo.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Photo.php&p1=shindig/trunk/php/src/social/model/Photo.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Photo.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Photo.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Url.php (from r1186446, shindig/trunk/php/src/social/model/Url.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Url.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Url.php&p1=shindig/trunk/php/src/social/model/Url.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/model/Url.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/model/Url.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\model;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/oauth/OAuthSecurityToken.php (from r1186446, shindig/trunk/php/src/social/oauth/OAuthSecurityToken.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/oauth/OAuthSecurityToken.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/oauth/OAuthSecurityToken.php&p1=shindig/trunk/php/src/social/oauth/OAuthSecurityToken.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/oauth/OAuthSecurityToken.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/oauth/OAuthSecurityToken.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\oauth;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/sample/DefaultInvalidateService.php (from r1186446, shindig/trunk/php/src/social/sample/DefaultInvalidateService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/sample/DefaultInvalidateService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/sample/DefaultInvalidateService.php&p1=shindig/trunk/php/src/social/sample/DefaultInvalidateService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/sample/DefaultInvalidateService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/sample/DefaultInvalidateService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,11 @@
 <?php
+namespace apache\shindig\social\sample;
+use apache\shindig\common\RemoteContentRequest;
+use apache\shindig\common\Cache;
+use apache\shindig\common\Config;
+use apache\shindig\common\SecurityToken;
+use apache\shindig\social\spi\InvalidateService;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/sample/JsonDbOpensocialService.php (from r1186446, shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/sample/JsonDbOpensocialService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/sample/JsonDbOpensocialService.php&p1=shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/sample/JsonDbOpensocialService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,24 @@
 <?php
+namespace apache\shindig\social\sample;
+use apache\shindig\social\service\SocialSpiException;
+use apache\shindig\social\spi\CollectionOptions;
+use apache\shindig\social\spi\RestfulCollection;
+use apache\shindig\social\spi\DataCollection;
+use apache\shindig\social\service\ResponseItem;
+use apache\shindig\social\service\ResponseError;
+use apache\shindig\common\Config;
+use apache\shindig\social\model\MediaItem;
+use apache\shindig\common\SecurityToken;
+use apache\shindig\social\spi\GroupId;
+use apache\shindig\social\spi\UserId;
+use apache\shindig\social\spi\ActivityService;
+use apache\shindig\social\spi\PersonService;
+use apache\shindig\social\spi\AppDataService;
+use apache\shindig\social\spi\GroupService;
+use apache\shindig\social\spi\MessagesService;
+use apache\shindig\social\spi\AlbumService;
+use apache\shindig\social\spi\MediaItemService;
+
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -115,14 +135,14 @@ class JsonDbOpensocialService implements
         $this->saveDb($jsonDecoded);
         return $jsonDecoded;
       }
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       throw new SocialSpiException("An error occured while reading/writing the json db: " . $e->getMessage(), ResponseError::$INTERNAL_ERROR);
     }
   }
 
   private function saveDb($db) {
     if (! @file_put_contents($this->getDbFilename(), json_encode($db))) {
-      throw new Exception("Could not save json db: " . $this->getDbFileName());
+      throw new \Exception("Could not save json db: " . $this->getDbFileName());
     }
   }
 
@@ -278,7 +298,7 @@ class JsonDbOpensocialService implements
 
     try {
       $people = $this->filterResults($people, $options);
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       $people['filtered'] = 'false';
     }
     
@@ -509,7 +529,7 @@ class JsonDbOpensocialService implements
       case CollectionOptions::FILTER_OP_STARTSWITH:
         return strpos($fieldValue, $filterValue) === 0;
       default:
-        throw new Exception('unrecognized filterOp');
+        throw new \Exception('unrecognized filterOp');
     }
   }
 
@@ -526,7 +546,7 @@ class JsonDbOpensocialService implements
       $db[self::$ACTIVITIES_TABLE] = $activitiesTable;
       $this->saveDb($db);
       // Should this return something to show success?
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       throw new SocialSpiException("Activity can't be created: " . $e->getMessage(), ResponseError::$INTERNAL_ERROR);
     }
   }
@@ -668,7 +688,7 @@ class JsonDbOpensocialService implements
       $db[self::$MESSAGES_TABLE] = $messagesTable;
       $this->saveDb($db);
       return $msgCollection;
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       throw new SocialSpiException("Message collection can't be created: " . $e->getMessage(), ResponseError::$INTERNAL_ERROR);
     }
   }
@@ -698,7 +718,7 @@ class JsonDbOpensocialService implements
       }
       $db[self::$MESSAGES_TABLE] = $messagesTable;
       $this->saveDb($db);
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       throw new SocialSpiException("Message collection can't be created: " . $e->getMessage(), ResponseError::$INTERNAL_ERROR);
     }
   }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ActivityHandler.php (from r1186446, shindig/trunk/php/src/social/service/ActivityHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ActivityHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ActivityHandler.php&p1=shindig/trunk/php/src/social/service/ActivityHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/ActivityHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ActivityHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\common\IllegalArgumentException;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -37,9 +40,9 @@ class ActivityHandler extends DataReques
     $userIds = $requestItem->getUsers();
     $activityIds = $requestItem->getListParameter("activityId");
     if (empty($userIds)) {
-      throw new InvalidArgumentException("No userId specified");
+      throw new \InvalidArgumentException("No userId specified");
     } elseif (count($userIds) > 1) {
-      throw new InvalidArgumentException("Multiple userIds not supported");
+      throw new \InvalidArgumentException("Multiple userIds not supported");
     }
     return $this->service->deleteActivities($userIds[0], $requestItem->getGroup(), $requestItem->getAppId(), $activityIds, $requestItem->getToken());
   }
@@ -62,7 +65,7 @@ class ActivityHandler extends DataReques
     $optionalActivityIds = $requestItem->getListParameter("activityId");
     // Preconditions
     if (empty($userIds)) {
-      throw new InvalidArgumentException("No userId specified");
+      throw new \InvalidArgumentException("No userId specified");
     } elseif (count($userIds) > 1 && ! empty($optionalActivityIds)) {
       throw new IllegalArgumentException("Cannot fetch same activityIds for multiple userIds");
     }
@@ -93,13 +96,13 @@ class ActivityHandler extends DataReques
     $userIds = $requestItem->getUsers();
     $activityIds = $requestItem->getListParameter("activityId");
     if (empty($userIds)) {
-      throw new InvalidArgumentException("No userId specified");
+      throw new \InvalidArgumentException("No userId specified");
     } elseif (count($userIds) > 1) {
-      throw new InvalidArgumentException("Multiple userIds not supported");
+      throw new \InvalidArgumentException("Multiple userIds not supported");
     }
     // TODO This seems reasonable to allow on PUT but we don't have an update verb.
     if (! empty($activityIds)) {
-      throw new InvalidArgumentException("Cannot specify activityId in create");
+      throw new \InvalidArgumentException("Cannot specify activityId in create");
     }
     /*
      * Note, on just about all types of social networks you would only allow activities to be created when the owner == viewer, and the userId == viewer as well, in code this would mean:

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/AlbumHandler.php (from r1186446, shindig/trunk/php/src/social/service/AlbumHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/AlbumHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/AlbumHandler.php&p1=shindig/trunk/php/src/social/service/AlbumHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/AlbumHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/AlbumHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\social\spi\CollectionOptions;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/AppDataHandler.php (from r1186446, shindig/trunk/php/src/social/service/AppDataHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/AppDataHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/AppDataHandler.php&p1=shindig/trunk/php/src/social/service/AppDataHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/AppDataHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/AppDataHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\service;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -41,9 +43,9 @@ class AppDataHandler extends DataRequest
     $requestItem->applyUrlTemplate(self::$APP_DATA_PATH);
     $userIds = $requestItem->getUsers();
     if (count($userIds) < 1) {
-      throw new InvalidArgumentException("No userId specified");
+      throw new \InvalidArgumentException("No userId specified");
     } elseif (count($userIds) > 1) {
-      throw new InvalidArgumentException("Multiple userIds not supported");
+      throw new \InvalidArgumentException("Multiple userIds not supported");
     }
     return $this->service->deletePersonData($userIds[0], $requestItem->getGroup(), $requestItem->getAppId(), $requestItem->getFields(), $requestItem->getToken());
   }
@@ -64,7 +66,7 @@ class AppDataHandler extends DataRequest
     $requestItem->applyUrlTemplate(self::$APP_DATA_PATH);
     $userIds = $requestItem->getUsers();
     if (count($userIds) < 1) {
-      throw new InvalidArgumentException("No userId(s) specified");
+      throw new \InvalidArgumentException("No userId(s) specified");
     }
     return $this->service->getPersonData($userIds[0], $requestItem->getGroup(), $requestItem->getAppId(), $requestItem->getFields(), $requestItem->getToken());
   }
@@ -89,9 +91,9 @@ class AppDataHandler extends DataRequest
     $requestItem->applyUrlTemplate(self::$APP_DATA_PATH);
     $userIds = $requestItem->getUsers();
     if (count($userIds) < 1) {
-      throw new InvalidArgumentException("No userId specified");
+      throw new \InvalidArgumentException("No userId specified");
     } elseif (count($userIds) > 1) {
-      throw new InvalidArgumentException("Multiple userIds not supported");
+      throw new \InvalidArgumentException("Multiple userIds not supported");
     }
     $values = $requestItem->getParameter("data");
     // this used to be $requestItem->getFields() instead of using the fields, but that makes no sense to me

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/DataRequestHandler.php (from r1186446, shindig/trunk/php/src/social/service/DataRequestHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/DataRequestHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/DataRequestHandler.php&p1=shindig/trunk/php/src/social/service/DataRequestHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/DataRequestHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/DataRequestHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,9 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\common\Config;
+use apache\shindig\common\ConfigException;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -73,7 +78,7 @@ abstract class DataRequestHandler {
       }
     } catch (SocialSpiException $e) {
       $response = new ResponseItem($e->getCode(), $e->getMessage());
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       $response = new ResponseItem(ResponseError::$INTERNAL_ERROR, "Internal error: " . $e->getMessage());
     }
     return $response;
@@ -102,7 +107,7 @@ abstract class DataRequestHandler {
     //TODO should detect if it's atom/xml or json here really. assuming json for now
     $decoded = json_decode($string);
     if ($decoded == $string) {
-      throw new Exception("Invalid JSON syntax");
+      throw new \Exception("Invalid JSON syntax");
     }
     return $decoded;
   }
@@ -145,7 +150,7 @@ abstract class DataRequestHandler {
       }
     }
     if (! count($version)) {
-      throw new Exception("Invalid container configuration, opensocial-x.y key not found");
+      throw new \Exception("Invalid container configuration, opensocial-x.y key not found");
     }
     rsort($version);
     return $version[0];

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/GroupHandler.php (from r1186446, shindig/trunk/php/src/social/service/GroupHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/GroupHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/GroupHandler.php&p1=shindig/trunk/php/src/social/service/GroupHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/GroupHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/GroupHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\service;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -40,7 +42,7 @@ class GroupHandler extends DataRequestHa
     $requestItem->applyUrlTemplate(self::$GROUPS_PATH);
     $userIds = $requestItem->getUsers();
     if (count($userIds) < 1) {
-      throw new InvalidArgumentException("No userId(s) specified");
+      throw new \InvalidArgumentException("No userId(s) specified");
     }
     return $this->service->getPersonGroups($userIds[0], $requestItem->getGroup(), $requestItem->getToken());
   }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/HandlerPreconditions.php (from r1186446, shindig/trunk/php/src/social/service/HandlerPreconditions.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/HandlerPreconditions.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/HandlerPreconditions.php&p1=shindig/trunk/php/src/social/service/HandlerPreconditions.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/HandlerPreconditions.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/HandlerPreconditions.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\service;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -32,7 +34,7 @@ class HandlerPreconditions {
    */
   public static function requireNotEmpty($item, $message) {
     if (empty($item)) {
-      throw new InvalidArgumentException($message);
+      throw new \InvalidArgumentException($message);
     }
   }
 
@@ -43,7 +45,7 @@ class HandlerPreconditions {
    */
   public static function requireEmpty($item, $message) {
     if (! empty($item)) {
-      throw new InvalidArgumentException($message);
+      throw new \InvalidArgumentException($message);
     }
   }
 
@@ -55,7 +57,7 @@ class HandlerPreconditions {
   public static function requireSingular($item, $message) {
     self::requireNotEmpty($item, $message);
     if (count($item) != 1) {
-      throw new InvalidArgumentException($message);
+      throw new \InvalidArgumentException($message);
     }
   }
 
@@ -67,7 +69,7 @@ class HandlerPreconditions {
   public static function requirePlural($item, $message) {
     self::requireNotEmpty($item, $message);
     if (count($item) <= 1) {
-      throw new InvalidArgumentException($message);
+      throw new \InvalidArgumentException($message);
     }
   }
 
@@ -78,7 +80,7 @@ class HandlerPreconditions {
    */
   public static function requireCondition($cond, $message) {
     if (! $cond) {
-      throw new InvalidArgumentException($message);
+      throw new \InvalidArgumentException($message);
     }
   }
 }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/HttpHandler.php (from r1186446, shindig/trunk/php/src/social/service/HttpHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/HttpHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/HttpHandler.php&p1=shindig/trunk/php/src/social/service/HttpHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/HttpHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/HttpHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,8 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\gadgets\MakeRequestOptions;
+use apache\shindig\common\Config;
+
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -66,7 +70,7 @@ class HttpHandler extends DataRequestHan
       );
     } catch (SocialSpiException $e) {
       $result = new ResponseItem($e->getCode(), $e->getMessage());
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       $result = new ResponseItem(ResponseError::$INTERNAL_ERROR, "Internal error: " . $e->getMessage());
     }
     return $result;

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/InvalidateHandler.php (from r1186446, shindig/trunk/php/src/social/service/InvalidateHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/InvalidateHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/InvalidateHandler.php&p1=shindig/trunk/php/src/social/service/InvalidateHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/InvalidateHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/InvalidateHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,10 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\common\Config;
+use apache\shindig\common\Cache;
+use apache\shindig\common\AuthenticationMode;
+use apache\shindig\common\ConfigException;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -49,7 +55,7 @@ class InvalidateHandler extends DataRequ
       $this->$method($requestItem);
     } catch (SocialSpiException $e) {
       $response = new ResponseItem($e->getCode(), $e->getMessage());
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       $response = new ResponseItem(ResponseError::$INTERNAL_ERROR, "Internal error: " . $e->getMessage());
     }
     return $response;

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/MediaItemHandler.php (from r1186446, shindig/trunk/php/src/social/service/MediaItemHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/MediaItemHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/MediaItemHandler.php&p1=shindig/trunk/php/src/social/service/MediaItemHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/MediaItemHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/MediaItemHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,10 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\social\spi\CollectionOptions;
+use apache\shindig\common\RemoteContentRequest;
+use apache\shindig\common\sample\BasicRemoteContent;
+use apache\shindig\social\model\MediaItem;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/MessagesHandler.php (from r1186446, shindig/trunk/php/src/social/service/MessagesHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/MessagesHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/MessagesHandler.php&p1=shindig/trunk/php/src/social/service/MessagesHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/MessagesHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/MessagesHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,9 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\social\spi\CollectionOptions;
+use apache\shindig\social\model\MessageCollection;
+use apache\shindig\social\model\Message;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -101,7 +106,7 @@ class MessagesHandler extends DataReques
 
     $msgCollId = $requestItem->getParameter("msgCollId");
     $entity = $requestItem->getParameter("entity");
-    
+
     // If the parameters contain 'message' the request is from the old api(< 0.9).
     if ($requestItem->getParameter("message")) {
       $entity = $requestItem->getParameter("message");

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/PersonHandler.php (from r1186446, shindig/trunk/php/src/social/service/PersonHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/PersonHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/PersonHandler.php&p1=shindig/trunk/php/src/social/service/PersonHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/PersonHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/PersonHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,12 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\common\IllegalArgumentException;
+use apache\shindig\social\spi\CollectionOptions;
+use apache\shindig\social\spi\UserId;
+use apache\shindig\social\spi\GroupId;
+use apache\shindig\social\spi\RestfulCollection;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -113,7 +121,7 @@ class PersonHandler extends DataRequestH
         $userIds = array_values($userIds);
         // Skip any requests if groupId is not @self or @all, since anonymous viewer won't have friends.
         if (($groupType != 'self') && ($groupType != 'all')) {
-          throw new Exception("Can't get friend from an anonymous viewer.");
+          throw new \Exception("Can't get friend from an anonymous viewer.");
         }
       }
     }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RequestItem.php (from r1186446, shindig/trunk/php/src/social/service/RequestItem.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RequestItem.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RequestItem.php&p1=shindig/trunk/php/src/social/service/RequestItem.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/RequestItem.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RequestItem.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,11 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\common\IllegalArgumentException;
+use apache\shindig\social\spi\UserId;
+use apache\shindig\social\spi\GroupId;
+use apache\shindig\social\spi\CollectionOptions;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ResponseError.php (from r1186446, shindig/trunk/php/src/social/service/ResponseError.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ResponseError.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ResponseError.php&p1=shindig/trunk/php/src/social/service/ResponseError.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/ResponseError.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ResponseError.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\service;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ResponseItem.php (from r1186446, shindig/trunk/php/src/social/service/ResponseItem.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ResponseItem.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ResponseItem.php&p1=shindig/trunk/php/src/social/service/ResponseItem.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/ResponseItem.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/ResponseItem.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\service;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RestRequestItem.php (from r1186446, shindig/trunk/php/src/social/service/RestRequestItem.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RestRequestItem.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RestRequestItem.php&p1=shindig/trunk/php/src/social/service/RestRequestItem.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/RestRequestItem.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RestRequestItem.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,9 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\common\IllegalArgumentException;
+use apache\shindig\common\Config;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -126,7 +131,7 @@ class RestRequestItem extends RequestIte
         }
         }
     } else {
-        throw new Exception("Invalid or unknown service endpoint: $service");
+        throw new \Exception("Invalid or unknown service endpoint: $service");
     }
   
   }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RpcRequestItem.php (from r1186446, shindig/trunk/php/src/social/service/RpcRequestItem.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RpcRequestItem.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RpcRequestItem.php&p1=shindig/trunk/php/src/social/service/RpcRequestItem.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/RpcRequestItem.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/RpcRequestItem.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/SocialSpiException.php (from r1186446, shindig/trunk/php/src/social/service/SocialSpiException.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/SocialSpiException.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/SocialSpiException.php&p1=shindig/trunk/php/src/social/service/SocialSpiException.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/SocialSpiException.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/SocialSpiException.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\service;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -18,5 +20,5 @@
  * under the License.
  */
 
-class SocialSpiException extends Exception {
+class SocialSpiException extends \Exception {
 }

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/SystemHandler.php (from r1186446, shindig/trunk/php/src/social/service/SystemHandler.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/SystemHandler.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/SystemHandler.php&p1=shindig/trunk/php/src/social/service/SystemHandler.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/service/SystemHandler.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/service/SystemHandler.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\service;
+use apache\shindig\common\Config;
+
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,8 +22,6 @@
  * under the License.
  */
 
-require_once 'src/gadgets/ContainerConfig.php';
-
 class SystemHandler extends DataRequestHandler {
 
   public function __construct() {  // do nothing, listMethods doesn't have a service implementation since it depends on the container.js configuration
@@ -38,7 +39,7 @@ class SystemHandler extends DataRequestH
       $response = $this->$method($requestItem);
     } catch (SocialSpiException $e) {
       $response = new ResponseItem($e->getCode(), $e->getMessage());
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       $response = new ResponseItem(ResponseError::$INTERNAL_ERROR, "Internal error: " . $e->getMessage());
     }
     return $response;

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/ApiServlet.php (from r1186446, shindig/trunk/php/src/social/servlet/ApiServlet.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/ApiServlet.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/ApiServlet.php&p1=shindig/trunk/php/src/social/servlet/ApiServlet.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/servlet/ApiServlet.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/ApiServlet.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,15 @@
 <?php
+namespace apache\shindig\social\servlet;
+use apache\shindig\social\service\ResponseItem;
+use apache\shindig\social\service\SocialSpiException;
+use apache\shindig\common\HttpServlet;
+use apache\shindig\common\Config;
+use apache\shindig\common\AuthenticationMode;
+use apache\shindig\common\sample\BasicSecurityToken;
+use apache\shindig\common\SecurityToken;
+use apache\shindig\social\service\ResponseError;
+use apache\shindig\social\service\RequestItem;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -18,29 +29,6 @@
  * under the License.
  */
 
-require_once 'src/social/service/DataRequestHandler.php';
-require_once 'src/common/SecurityToken.php';
-require_once 'src/common/BlobCrypter.php';
-require_once 'src/social/converters/InputConverter.php';
-require_once 'src/social/converters/OutputConverter.php';
-require_once 'src/social/service/RequestItem.php';
-require_once 'src/social/service/RestRequestItem.php';
-require_once 'src/social/service/RpcRequestItem.php';
-require_once 'src/social/spi/GroupId.php';
-require_once 'src/social/spi/UserId.php';
-require_once 'src/social/spi/CollectionOptions.php';
-require_once 'src/common/Cache.php';
-require_once 'src/social/model/ComplexField.php';
-require_once 'src/social/model/Name.php';
-require_once 'src/social/model/Enum.php';
-require_once 'src/social/model/Person.php';
-require_once 'src/social/model/ListField.php';
-require_once 'src/social/model/Photo.php';
-require_once 'src/social/spi/RestfulCollection.php';
-require_once 'src/social/spi/DataCollection.php';
-require_once 'src/social/service/ResponseItem.php';
-require_once 'src/common/ShindigOAuth.php';
-
 /**
  * Common base class for API servlets.
  */
@@ -72,7 +60,7 @@ abstract class ApiServlet extends HttpSe
         $prefix = substr($_SERVER['CONTENT_TYPE'], 0, strpos($_SERVER['CONTENT_TYPE'], '/'));
         $acceptedMediaPrefixes = array('image', 'video', 'audio');
         if (! in_array($prefix, $acceptedMediaPrefixes)) {
-          throw new Exception("When posting to the social end-point you have to specify a content type,
+          throw new \Exception("When posting to the social end-point you have to specify a content type,
               supported content types are: 'application/json', 'application/xml' and 'application/atom+xml'.
               For content upload, content type can be 'image/*', 'audio/*' and 'video/*'");
         }
@@ -89,7 +77,7 @@ abstract class ApiServlet extends HttpSe
     $scheme = (! isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http' : 'https';
     $http_url = $scheme . '://' . (Config::get('http_host') ? Config::get('http_host') : $_SERVER['HTTP_HOST']) . $_SERVER['REQUEST_URI'];
     // see if we have an OAuth request
-    $request = OAuthRequest::from_request(null, $http_url, null);
+    $request = \OAuthRequest::from_request(null, $http_url, null);
     $appUrl = $request->get_parameter('oauth_consumer_key');
     $userId = $request->get_parameter('xoauth_requestor_id'); // from Consumer Request extension (2-legged OAuth)
     $signature = $request->get_parameter('oauth_signature');

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/CompatibilityJsonRpcServlet.php (from r1186446, shindig/trunk/php/src/social/servlet/CompatibilityJsonRpcServlet.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/CompatibilityJsonRpcServlet.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/CompatibilityJsonRpcServlet.php&p1=shindig/trunk/php/src/social/servlet/CompatibilityJsonRpcServlet.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/servlet/CompatibilityJsonRpcServlet.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/CompatibilityJsonRpcServlet.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\servlet;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/DataServiceServlet.php (from r1186446, shindig/trunk/php/src/social/servlet/DataServiceServlet.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/DataServiceServlet.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/DataServiceServlet.php&p1=shindig/trunk/php/src/social/servlet/DataServiceServlet.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/servlet/DataServiceServlet.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/DataServiceServlet.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,16 @@
 <?php
+namespace apache\shindig\social\servlet;
+use apache\shindig\social\converters\OutputXmlConverter;
+use apache\shindig\social\converters\OutputAtomConverter;
+use apache\shindig\social\converters\OutputJsonConverter;
+use apache\shindig\common\Config;
+use apache\shindig\social\service\ResponseError;
+use apache\shindig\social\service\RestRequestItem;
+use apache\shindig\social\service\ResponseItem;
+use apache\shindig\common\SecurityToken;
+use apache\shindig\social\spi\DataCollection;
+use apache\shindig\social\spi\RestfulCollection;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -50,7 +62,7 @@ class DataServiceServlet extends ApiServ
       $inputConverterMethod = $this->getInputConverterMethodForRequest();
       $outputConverter = $this->getOutputConverterForRequest();
       $this->handleSingleRequest($token, $inputConverterMethod, $outputConverter);
-    } catch (Exception $e) {
+    } catch (\Exception $e) {
       $code = '500 Internal Server Error';
       header("HTTP/1.0 $code", true);
       echo "<h1>$code - Internal Server Error</h1>\n" . $e->getMessage();
@@ -194,7 +206,7 @@ class DataServiceServlet extends ApiServ
       case 'json':
         return 'convertJson';
       default:
-        throw new Exception("Unknown format param: $inputFormat");
+        throw new \Exception("Unknown format param: $inputFormat");
     }
   }
 

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/JsonRpcServlet.php (from r1186446, shindig/trunk/php/src/social/servlet/JsonRpcServlet.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/JsonRpcServlet.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/JsonRpcServlet.php&p1=shindig/trunk/php/src/social/servlet/JsonRpcServlet.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/servlet/JsonRpcServlet.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/servlet/JsonRpcServlet.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,10 @@
 <?php
+namespace apache\shindig\social\servlet;
+use apache\shindig\social\service\RpcRequestItem;
+use apache\shindig\social\service\ResponseItem;
+use apache\shindig\social\spi\RestfulCollection;
+use apache\shindig\social\spi\DataCollection;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -130,10 +136,10 @@ class JsonRpcServlet extends ApiServlet 
       $requestParam = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : (get_magic_quotes_gpc() ? stripslashes($_POST['request']) : $_POST['request']);
       $request = json_decode($requestParam, true);
       if ($request == $requestParam) {
-        throw new InvalidArgumentException("Malformed json string");
+        throw new \InvalidArgumentException("Malformed json string");
       }
     } else {
-      throw new InvalidArgumentException("Missing POST data");
+      throw new \InvalidArgumentException("Missing POST data");
     }
     if ((strpos($requestParam, '[') !== false) && strpos($requestParam, '[') < strpos($requestParam, '{')) {
       // Is a batch

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/ActivityService.php (from r1186446, shindig/trunk/php/src/social/spi/ActivityService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/ActivityService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/ActivityService.php&p1=shindig/trunk/php/src/social/spi/ActivityService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/ActivityService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/ActivityService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\spi;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/AlbumService.php (from r1186446, shindig/trunk/php/src/social/spi/AlbumService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/AlbumService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/AlbumService.php&p1=shindig/trunk/php/src/social/spi/AlbumService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/AlbumService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/AlbumService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\spi;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/AppDataService.php (from r1186446, shindig/trunk/php/src/social/spi/AppDataService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/AppDataService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/AppDataService.php&p1=shindig/trunk/php/src/social/spi/AppDataService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/AppDataService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/AppDataService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\spi;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/CollectionOptions.php (from r1186446, shindig/trunk/php/src/social/spi/CollectionOptions.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/CollectionOptions.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/CollectionOptions.php&p1=shindig/trunk/php/src/social/spi/CollectionOptions.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/CollectionOptions.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/CollectionOptions.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\spi;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/DataCollection.php (from r1186446, shindig/trunk/php/src/social/spi/DataCollection.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/DataCollection.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/DataCollection.php&p1=shindig/trunk/php/src/social/spi/DataCollection.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/DataCollection.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/DataCollection.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\spi;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/GroupId.php (from r1186446, shindig/trunk/php/src/social/spi/GroupId.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/GroupId.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/GroupId.php&p1=shindig/trunk/php/src/social/spi/GroupId.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/GroupId.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/GroupId.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\spi;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/GroupService.php (from r1186446, shindig/trunk/php/src/social/spi/GroupService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/GroupService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/GroupService.php&p1=shindig/trunk/php/src/social/spi/GroupService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/GroupService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/GroupService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\spi;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/InvalidateService.php (from r1186446, shindig/trunk/php/src/social/spi/InvalidateService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/InvalidateService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/InvalidateService.php&p1=shindig/trunk/php/src/social/spi/InvalidateService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/InvalidateService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/InvalidateService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,8 @@
 <?php
+namespace apache\shindig\social\spi;
+use apache\shindig\common\SecurityToken;
+use apache\shindig\common\RemoteContentRequest;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/MediaItemService.php (from r1186446, shindig/trunk/php/src/social/spi/MediaItemService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/MediaItemService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/MediaItemService.php&p1=shindig/trunk/php/src/social/spi/MediaItemService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/MediaItemService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/MediaItemService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\spi;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/MessagesService.php (from r1186446, shindig/trunk/php/src/social/spi/MessagesService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/MessagesService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/MessagesService.php&p1=shindig/trunk/php/src/social/spi/MessagesService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/MessagesService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/MessagesService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\spi;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/PersonService.php (from r1186446, shindig/trunk/php/src/social/spi/PersonService.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/PersonService.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/PersonService.php&p1=shindig/trunk/php/src/social/spi/PersonService.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/PersonService.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/PersonService.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\spi;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/RestfulCollection.php (from r1186446, shindig/trunk/php/src/social/spi/RestfulCollection.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/RestfulCollection.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/RestfulCollection.php&p1=shindig/trunk/php/src/social/spi/RestfulCollection.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/RestfulCollection.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/RestfulCollection.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,6 @@
 <?php
+namespace apache\shindig\social\spi;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Copied: shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/UserId.php (from r1186446, shindig/trunk/php/src/social/spi/UserId.php)
URL: http://svn.apache.org/viewvc/shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/UserId.php?p2=shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/UserId.php&p1=shindig/trunk/php/src/social/spi/UserId.php&r1=1186446&r2=1190083&rev=1190083&view=diff
==============================================================================
--- shindig/trunk/php/src/social/spi/UserId.php (original)
+++ shindig/branches/php_namespace_refactoring/php/src/apache/shindig/social/spi/UserId.php Thu Oct 27 23:20:41 2011
@@ -1,4 +1,7 @@
 <?php
+namespace apache\shindig\social\spi;
+use apache\shindig\common\SecurityToken;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -48,7 +51,7 @@ class UserId {
         return $this->userId;
         break;
       default:
-        throw new Exception("The type field is not a valid enum: {$this->type}");
+        throw new \Exception("The type field is not a valid enum: {$this->type}");
         break;
     }
   }