MangoPay/Libraries/DefaultStorageStrategy.php
public function Store($token)
    {
        if (!is_writable($this->GetPathToTemporaryFolder())) {
            throw new \MangoPay\Libraries\Exception('Cannot create or write to file ' . $this->GetPathToTemporaryFolder());
        }
        
        $serialized = serialize($token);
        $result = file_put_contents($this->GetPathToFile(), $this->_prefixContent . $serialized, LOCK_EX);
        if ($result === false) {
            throw new \MangoPay\Libraries\Exception('Cannot put token to file');
        }
    }
public function Store($token)
    {
        if (!is_writable($this->GetPathToTemporaryFolder())) {
            throw new \MangoPay\Libraries\Exception('Cannot create or write to file ' . $this->GetPathToTemporaryFolder());
        }
        
        $serialized = serialize($token);
        $result = file_put_contents($this->GetPathToFile(), $this->_prefixContent . $serialized, LOCK_EX);
        if ($result === false) {
            throw new \MangoPay\Libraries\Exception('Cannot put token to file');
        }
    }
public function Store ( $ token ) { if ( ! is_writable ( $ this -> GetPathToTemporaryFolder ( ) ) ) { throw new \ MangoPay \ Libraries \ Exception ( 'Cannot create or write to file ' . $ this -> GetPathToTemporaryFolder ( ) ) ; } $ serialized = serialize ( $ token ) ; $ result = file_put_contents ( $ this -> GetPathToFile ( ) , $ this -> _prefixContent . $ serialized , LOCK_EX ) ; if ( $ result === false ) { throw new \ MangoPay \ Libraries \ Exception ( 'Cannot put token to file' ) ; } }
Stores authorization token passed as an argument.
@param \MangoPay\Libraries\OAuthToken $token Token instance to be stored.
Stores authorization token passed as an argument .