Jump to content

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

Photo

Class 'edam_type_Notebook' not found

php

  • Please log in to reply
7 replies to this topic

#1 xaitoh

xaitoh

  • Pip
  • Title: Member
  • Group: Members
  • 11 posts

Posted 27 July 2012 - 06:21 AM

Hello,
If this program is moved, the following errors will come out.

PHP Fatal error: Class 'edam_type_Notebook' not found

Login is possible.
"listTags" can be moved and acquired.
"createNotebook" does not move.
"edam_type_Notebook" was used for reference for the following.

http://discussion.ev...ing-a-notebook/

A cause is not known.
Someone should help me...

<?php


require_once("/common/common.inc.php");

use EDAM\UserStore\UserStoreClient;
use EDAM\NoteStore\NoteStoreClient;
use EDAM\Types\Data, EDAM\Types\Note, EDAM\Types\Resource, EDAM\Types\ResourceAttributes;
use EDAM\Error\EDAMUserException, EDAM\Error\EDAMErrorCode;

ini_set("include_path", ini_get("include_path") . PATH_SEPARATOR . "../common/evernote/lib" . PATH_SEPARATOR);
require_once("autoload.php");
require_once("Thrift.php");
require_once("transport/TTransport.php");
require_once("transport/THttpClient.php");
require_once("protocol/TProtocol.php");
require_once("protocol/TBinaryProtocol.php");
require_once("packages/Errors/Errors_types.php");
require_once("packages/Types/Types_types.php");
require_once("packages/UserStore/UserStore.php");
require_once("packages/UserStore/UserStore_constants.php");
require_once("packages/NoteStore/NoteStore.php");
require_once("packages/Limits/Limits_constants.php");

require_once("packages/NoteStore/NoteStore_types.php");


session_start();


$noteStoreTrans = new THttpClient(NOTESTORE_HOST, NOTESTORE_PORT, NOTESTORE_PATH. $_SESSION['edam_shard'], NOTESTORE_PROTOCOL);
$noteStoreProt = new TBinaryProtocol($noteStoreTrans);
$noteStore = new NoteStoreClient($noteStoreProt, $noteStoreProt);
$authToken = $_SESSION['accessToken'];

//tag is acquired.
$tags = $noteStore->listTags($_SESSION['accessToken']);
$tag_options[''] = '';
foreach ($tags as $tag) {
echo "guid = ".$tag->guid."<br />\n";
echo "name = ".$tag->name."<br />\n";
}

//notebook is created.
$notebook = new edam_type_Notebook();
$notebook->name = "MY NEW ONE";
$noteStore->createNotebook($authToken, $notebook);

echo "notebook is created.<br />\n";




#2 Julien Boedec

Julien Boedec

  • Title: Browncoat
  • Group: Evernote Employee
  • 407 posts

Posted 27 July 2012 - 05:49 PM

What version of PHP are you using? Did you edit the sample code before running it?

#3 xaitoh

xaitoh

  • Pip
  • Title: Member
  • Group: Members
  • 11 posts

Posted 28 July 2012 - 12:22 AM

sorry.
It is the version information of PHP.

--------
PHP 5.3.3 (cli) (built: Jul 3 2012 16:53:21)
Copyright © 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2010 Zend Technologies
with Xdebug v2.1.2, Copyright © 2002-2011, by Derick Rethans

Evernote SDK for PHP version 1.21
--------

The sample code is not editing.

#4 xaitoh

xaitoh

  • Pip
  • Title: Member
  • Group: Members
  • 11 posts

Posted 03 August 2012 - 02:22 AM

Although it thinks that there is probably a problem in external reading of a file, it does not running yet.

Since a hint may be sufficient, please tell me an opinion.
Someone should help me...

#5 Lil Dre

Lil Dre

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 71 posts

Posted 03 August 2012 - 07:39 AM

basicly, I'm using $notebook = new Notebook(); to creat the notebook.

you could try it.

#6 xaitoh

xaitoh

  • Pip
  • Title: Member
  • Group: Members
  • 11 posts

Posted 08 August 2012 - 08:51 AM

It did not running by Notebook();

Since it may possibly be a problem of authority, it asks Evernote,
but if there are those who give some hints, please give.

#7 Julien Boedec

Julien Boedec

  • Title: Browncoat
  • Group: Evernote Employee
  • 407 posts

Posted 13 August 2012 - 07:22 PM

In the header section add EDAM\Types\Notebook to include the Notebook class and instantiate it using new Notebook (), that should fix you're error.

#8 xaitoh

xaitoh

  • Pip
  • Title: Member
  • Group: Members
  • 11 posts

Posted 16 August 2012 - 02:57 AM

it running the program.
Thank you, everyone!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Clip to Evernote