Skip to content

Commit

Permalink
Rename Sip.php to please Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Burke committed Sep 6, 2013
1 parent b446fe8 commit 8b43c94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Services/Twilio/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function getSubresources($name = null) {
protected function setupSubresources()
{
foreach (func_get_args() as $name) {
$constantized = ucfirst(self::camelize($name));
$constantized = ucfirst(static::camelize($name));
$type = "Services_Twilio_Rest_" . $constantized;
$this->subresources[$name] = new $type(
$this->client, $this->uri . "/$constantized"
Expand Down
9 changes: 5 additions & 4 deletions Services/Twilio/Rest/SIP.php → Services/Twilio/Rest/Sip.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For Linux filename compatibility, this file needs to be named Sip.php, or
* camelize() needs to be special cased in setupSubresources
*/

class Services_Twilio_Rest_SIP extends Services_Twilio_InstanceResource {
protected function init($client, $uri) {
$this->setupSubresources(
Expand All @@ -12,8 +17,4 @@ protected function init($client, $uri) {
public function getResourceName($camelized = false) {
return "SIP";
}

public static function camelize($name) {
return 'SIP';
}
}

0 comments on commit 8b43c94

Please sign in to comment.