Download the PHP package erwang/dataobject without Composer

On this page you can find all versions of the php package erwang/dataobject. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dataobject

ErwanG\DataObject

Class DataObject

@package ErwanG

Database structure :

Example:

More examples in examples.php;

__construct

DataObject constructor.

get

return object with id

@param $id

@return mixed|null

setPDO

must be call to set PDO connection

@param $params must contain keys dbname, hostn username, password

@return PDO

_prepare

@param $query

@return \PDOStatement

query

execute query and return result as DataObject

must be use for SELECT queries only

@param $query

@param array $params

@return array

exec

execute query and return result

@param $query

@param array $params

@return \PDOStatement

getTable

return name table

default value is class name

@return string

getColumns

return table columns

@return mixed

where

return DataObject from where query

@param $where

@param array $params

@param null $order

@param null $limit

@return DataObject[]

whereFirst

return first DataObject from where query

@param $where

@param array $params

@param null $order

@return DataObject|null

whereLast

return last DataObject from where query

@param $where

@param array $params

@param null $order

@return DataObject|null

find

return DataObject from associative array

@param $params

@param null $order

@param null $limit

@return array

findFirst

return first DataObject from associative array

@param $params

@param $order

@param bool $create if true, create object if not find

@return DataObject|null

findLast

return last DataObject from associative array

@param $params

@param $order

@return DataObject|null

findAll

return all object

@param null $order

@param null $limit

@return array

__get

@param $name

@return array

@throws \Exception

create

create a DataObject from associative array

@param $params

@return DataObject

order

Set string ORDER BY...

@param $order

@return string

limit

Set string LIMIT...

@param $limit

@return string

count

return count from where query

@param null $where

@param $params

@return int

isInDatabase

return true if object is in database

@return bool

defineId

return an uniq id

@return bool|string

hasMany

return object with relation

@param string $class

@return array

@throws \Exception

_getNamespace

@return string

_getClass

@return string

getModel

@param null $separator

@return mixed|string

_getClassBetween

@param $class

@param bool $namespace

@return string

store

Store object in database

@return $this

@throws \Exception

delete

delete object in database

@return bool

tableExists

return true if table exists

@return boolean

hasColumn

test column existence

@param string $column column name

@return boolean

drop

drop table

@param bool $foreignKeyCheck

@return bool

truncate

truncate table

@example CLASS::truncate(false);

@param bool $foreignKeyCheck

@return bool

populate

populate object with associative array

@param $params

@return $this

isEqualTo

@param Object $object

@return bool

copy

copy object without id param

@return DataObject

beginTransaction

begin transaction if none has been started

commit

commit transaction

rollback

roll back


All versions of dataobject with dependencies

PHP Build Version
Package Version
Requires nategood/commando Version 0.3.*
seld/cli-prompt Version 1.0.*
nette/php-generator Version 3.2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package erwang/dataobject contains the following files

Loading the files please wait ....