File manager - Edit - /home/opticamezl/www/newok/sdk.zip
Back
PK ��\c��B� � Makefilenu &1i� # Twilio API helper library. # See LICENSE file for copyright and license details. COMPOSER = $(shell which composer) ifeq ($(strip $(COMPOSER)),) COMPOSER = php composer.phar endif all: test clean: @rm -rf venv vendor install: @composer --version || (echo "Composer is not installed, please install Composer"; exit 1); # Composer: http://getcomposer.org/download/ $(COMPOSER) install vendor: install # if these fail, you may need to install the helper library test: install @PATH=vendor/bin:$(PATH) phpunit --report-useless-tests --strict-coverage --disallow-test-output --colors --configuration Twilio/Tests/phpunit.xml @PATH=vendor/bin:$(PATH) phpunit --report-useless-tests --strict-coverage --disallow-test-output --colors Services/Tests/TwilioTest.php docs-install: composer require --dev apigen/apigen docs: docs-install vendor/bin/apigen generate -s ./ -d docs/api --exclude="Tests/*" --exclude="vendor/*" --exclude="autoload.php" --template-theme bootstrap --main Twilio authors: echo "Authors\n=======\n\nA huge thanks to all of our contributors:\n\n" > AUTHORS.md git log --raw | grep "^Author: " | cut -d ' ' -f2- | cut -d '<' -f1 | sed 's/^/- /' | sort | uniq >> AUTHORS.md .PHONY: all clean test docs docs-install test-install authors PK ��\�O��* * Twilio/ListResource.phpnu &1i� <?php namespace Twilio; class ListResource { protected $version; protected $solution = array(); protected $uri; public function __construct(Version $version) { $this->version = $version; } public function __toString() { return '[ListResource]'; } }PK ��\:�nt t Twilio/Serialize.phpnu &1i� <?php namespace Twilio; class Serialize { private static function flatten($map, $result = array(), $previous = array()) { foreach ($map as $key => $value) { if (is_array($value)) { $result = self::flatten($value, $result, array_merge($previous, array($key))); } else { $result[join(".", array_merge($previous, array($key)))] = $value; } } return $result; } public static function prefixedCollapsibleMap($map, $prefix) { if (is_null($map) || $map == \Twilio\Values::NONE) { return array(); } $flattened = self::flatten($map); $result = array(); foreach ($flattened as $key => $value) { $result[$prefix . '.' . $key] = $value; } return $result; } public static function iso8601Date($dateTime) { if (is_null($dateTime) || $dateTime == \Twilio\Values::NONE) { return \Twilio\Values::NONE; } if (is_string($dateTime)) { return $dateTime; } $utcDate = clone $dateTime; $utcDate->setTimezone(new \DateTimeZone('UTC')); return $utcDate->format('Y-m-d'); } public static function iso8601DateTime($dateTime) { if (is_null($dateTime) || $dateTime == \Twilio\Values::NONE) { return \Twilio\Values::NONE; } if (is_string($dateTime)) { return $dateTime; } $utcDate = clone $dateTime; $utcDate->setTimezone(new \DateTimeZone('UTC')); return $utcDate->format('Y-m-d\TH:i:s\Z'); } public static function booleanToString($boolOrStr) { if (is_null($boolOrStr) || is_string($boolOrStr)) { return $boolOrStr; } return $boolOrStr ? 'True' : 'False'; } public static function json_object($object) { trigger_error("Serialize::json_object has been deprecated in favor of Serialize::jsonObject", E_USER_NOTICE); return Serialize::jsonObject($object); } public static function jsonObject($object) { if (is_array($object)) { return json_encode($object); } return $object; } public static function map($values, $map_func) { if (!is_array($values)) { return $values; } return array_map($map_func, $values); } } PK ��\��e�� � $ Twilio/Security/RequestValidator.phpnu &1i� <?php namespace Twilio\Security; class RequestValidator { protected $authToken; function __construct($authToken) { $this->authToken = $authToken; } public function computeSignature($url, $data = array()) { // sort the array by keys ksort($data); // append them to the data string in order // with no delimiters foreach ($data as $key => $value) $url .= "$key$value"; // This function calculates the HMAC hash of the data with the key // passed in // Note: hash_hmac requires PHP 5 >= 5.1.2 or PECL hash:1.1-1.5 // Or http://pear.php.net/package/Crypt_HMAC/ return base64_encode(hash_hmac("sha1", $url, $this->authToken, true)); } public function validate($expectedSignature, $url, $data = array()) { return self::compare( $this->computeSignature($url, $data), $expectedSignature ); } /** * Time insensitive compare, function's runtime is governed by the length * of the first argument, not the difference between the arguments. * @param $a string First part of the comparison pair * @param $b string Second part of the comparison pair * @return bool True if $a == $b, false otherwise. */ public static function compare($a, $b) { $result = true; if (strlen($a) != strlen($b)) { return false; } if (!$a && !$b) { return true; } $limit = strlen($a); for ($i = 0; $i < $limit; ++$i) { if ($a[$i] != $b[$i]) { $result = false; } } return $result; } } PK ��\h���0 0 Twilio/InstanceContext.phpnu &1i� <?php namespace Twilio; class InstanceContext { protected $version; protected $solution = array(); protected $uri; public function __construct(Version $version) { $this->version = $version; } public function __toString() { return '[InstanceContext]'; } }PK ��\3�,t� � Twilio/autoload.phpnu &1i� <?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the MIT license. For more information, see * <http://www.doctrine-project.org>. */ /** * SplClassLoader implementation that implements the technical interoperability * standards for PHP 5.3 namespaces and class names. * * http://groups.google.com/group/php-standards/web/psr-0-final-proposal?pli=1 * * // Example which loads classes for the Doctrine Common package in the * // Doctrine\Common namespace. * $classLoader = new SplClassLoader('Doctrine\Common', '/path/to/doctrine'); * $classLoader->register(); * * @license http://www.opensource.org/licenses/mit-license.html MIT License * @author Jonathan H. Wage <jonwage@gmail.com> * @author Roman S. Borschel <roman@code-factory.org> * @author Matthew Weier O'Phinney <matthew@zend.com> * @author Kris Wallsmith <kris.wallsmith@gmail.com> * @author Fabien Potencier <fabien.potencier@symfony-project.org> */ class SplClassLoader { private $_fileExtension = '.php'; private $_namespace; private $_includePath; private $_namespaceSeparator = '\\'; /** * Creates a new <tt>SplClassLoader</tt> that loads classes of the * specified namespace. * * @param string $ns The namespace to use. * @param string $includePath The include path to search */ public function __construct($ns = null, $includePath = null) { $this->_namespace = $ns; $this->_includePath = $includePath; } /** * Sets the namespace separator used by classes in the namespace of this class loader. * * @param string $sep The separator to use. */ public function setNamespaceSeparator($sep) { $this->_namespaceSeparator = $sep; } /** * Gets the namespace separator used by classes in the namespace of this class loader. * * @return string The separator to use. */ public function getNamespaceSeparator() { return $this->_namespaceSeparator; } /** * Sets the base include path for all class files in the namespace of this class loader. * * @param string $includePath */ public function setIncludePath($includePath) { $this->_includePath = $includePath; } /** * Gets the base include path for all class files in the namespace of this class loader. * * @return string $includePath */ public function getIncludePath() { return $this->_includePath; } /** * Sets the file extension of class files in the namespace of this class loader. * * @param string $fileExtension */ public function setFileExtension($fileExtension) { $this->_fileExtension = $fileExtension; } /** * Gets the file extension of class files in the namespace of this class loader. * * @return string $fileExtension */ public function getFileExtension() { return $this->_fileExtension; } /** * Installs this class loader on the SPL autoload stack. */ public function register() { spl_autoload_register(array($this, 'loadClass')); } /** * Uninstalls this class loader from the SPL autoloader stack. */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); } /** * Loads the given class or interface. * * @param string $className The name of the class to load. * @return void */ public function loadClass($className) { if (null === $this->_namespace || $this->_namespace . $this->_namespaceSeparator === substr($className, 0, strlen($this->_namespace . $this->_namespaceSeparator))) { $fileName = ''; $namespace = ''; if (false !== ($lastNsPos = strripos($className, $this->_namespaceSeparator))) { $namespace = substr($className, 0, $lastNsPos); $className = substr($className, $lastNsPos + 1); $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; } $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension; require ($this->_includePath !== null ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName; } } } $twilioClassLoader = new SplClassLoader('Twilio', realpath(__DIR__ . DIRECTORY_SEPARATOR . '..')); $twilioClassLoader->register();PK ��\�6��4 4 Twilio/TwiML/FaxResponse.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML; class FaxResponse extends TwiML { /** * FaxResponse constructor. */ public function __construct() { parent::__construct('Response'); } /** * Add Receive child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function receive($attributes = array()) { return $this->nest(new Fax\Receive($attributes)); } }PK ��\�G�� � Twilio/TwiML/VoiceResponse.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML; class VoiceResponse extends TwiML { /** * VoiceResponse constructor. */ public function __construct() { parent::__construct('Response'); } /** * Add Dial child. * * @param string $number Phone number to dial * @param array $attributes Optional attributes * @return TwiML Child element. */ public function dial($number, $attributes = array()) { return $this->nest(new Voice\Dial($number, $attributes)); } /** * Add Echo child. * * @return TwiML Child element. */ public function echo_() { return $this->nest(new Voice\Echo_()); } /** * Add Enqueue child. * * @param string $name Friendly name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function enqueue($name = null, $attributes = array()) { return $this->nest(new Voice\Enqueue($name, $attributes)); } /** * Add Gather child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function gather($attributes = array()) { return $this->nest(new Voice\Gather($attributes)); } /** * Add Hangup child. * * @return TwiML Child element. */ public function hangup() { return $this->nest(new Voice\Hangup()); } /** * Add Leave child. * * @return TwiML Child element. */ public function leave() { return $this->nest(new Voice\Leave()); } /** * Add Pause child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function pause($attributes = array()) { return $this->nest(new Voice\Pause($attributes)); } /** * Add Play child. * * @param url $url Media URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function play($url = null, $attributes = array()) { return $this->nest(new Voice\Play($url, $attributes)); } /** * Add Queue child. * * @param string $name Queue name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function queue($name, $attributes = array()) { return $this->nest(new Voice\Queue($name, $attributes)); } /** * Add Record child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function record($attributes = array()) { return $this->nest(new Voice\Record($attributes)); } /** * Add Redirect child. * * @param url $url Redirect URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function redirect($url, $attributes = array()) { return $this->nest(new Voice\Redirect($url, $attributes)); } /** * Add Reject child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function reject($attributes = array()) { return $this->nest(new Voice\Reject($attributes)); } /** * Add Say child. * * @param string $message Message to say * @param array $attributes Optional attributes * @return TwiML Child element. */ public function say($message, $attributes = array()) { return $this->nest(new Voice\Say($message, $attributes)); } /** * Add Sms child. * * @param string $message Message body * @param array $attributes Optional attributes * @return TwiML Child element. */ public function sms($message, $attributes = array()) { return $this->nest(new Voice\Sms($message, $attributes)); } }PK ��\5�D�� � "